This page will help you get started with the CSGOEmpire API.
All requests are included in bash form. You can use a program like Postman to import the request and generate code for most major languages.
Any code provided is as an example, you should write your own if you wish to do more than the most basic tasks.
Any input marked (required)
is required for the request to work, anything without that is optional.
It is strongly recommended that Websocket be used instead of polling API endpoints to avoid rate limits.
API Keys
API keys can be created, viewed, and revoked here: https://csgoempire.com/trading/apikey
Setting up an API key requires 2FA to be activated, 2FA codes are not required for requests authenticated via API key.
Authentication
You can authenticate yourself with our API by adding your API key (bearer token) in the HTTP header. You can read more about this here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization.
Syntax
Authorization: <auth-scheme> <authorization-parameters>
Example
Authorization: Bearer <CSGOEmpire_API_KEY>
Libraries & Links
Currently we don't offer any official library for the API, but below you can find links to unofficial libraries and resources to help you with creating your first bot.
Please note that as these are unofficial libraries and may not be maintained or updated regularly, you should also verify the source code yourself.
Official Links
- old docs: https://github.com/OfficialCSGOEmpire/API-Docs (currently not maintained)
Libraries
Ratelimits
Rate limits limit the number of requests you can make per second from one IP. Currently there is a global request limit (to any endpoint) of 120 requests per 60 seconds. If you exceed a ratelimit you'll be unable to access any endpoints for 60 seconds. This will return a response with a status code of 429.
Trade Statuses
Code | Status |
---|---|
-1 | Error |
0 | Pending |
1 | Received |
2 | Processing |
3 | Sending |
4 | Confirming |
5 | Sent |
6 | Completed |
7 | Declined |
8 | Canceled |
9 | Timed Out |
10 | Credited |
11 | Disputed |