CSGOEmpire API Documentation
Contents
Getting started
All requests are included in bash form. You can use a program like Postman to import the request (example) and generate (example) 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.
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.
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 as these are unofficial libraries, they may not be maintained or updated regularly, you should also verify the source code yourself.
If you have something you think should be added here, please open an issue with a link to the library or resource and a description of what it is/does.
Libraries
Links
Rate Limits
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 10 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.
[Back to contents]
Trade Status Enums
Below are a list of trade statuses. Trade endpoints will return status enums.
- Error = -1;
- Pending = 0;
- Received = 1;
- Processing = 2;
- Sending = 3;
- Confirming = 4;
- Sent = 5;
- Completed = 6;
- Declined = 7;
- Canceled = 8;
- TimedOut = 9;
- Credited = 10;
[Back to contents]
Metadata
URL: https://csgoempire.com/api/v2/metadata/socket
Method: GET
Returns the user object, which is used to identify via websocket, as well as socket token (authorizationToken) & socket signature (signature) which are used to authenticate on websocket.
Example Request:
```bash
curl --location --request GET 'https://csgoempire.com/api/v2/metadata/socket' \
--header 'Authorization: Bearer {API-KEY-HERE}'
```
Example Response:
```json
{
"user": {
"id": 303119,
"steam_id": "76561198106192114",
"steam_id_v3": "145926386",
"steam_name": "Artemis",
"avatar": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/4f/4f619bc788f0d41261d2a5ced0e96a281af88479_full.jpg",
"profile_url": "https://steamcommunity.com/id/G0FastMen/",
"registration_timestamp": "2016-07-27 23:20:03",
"registration_ip": "0.0.0.0",
"last_login": "2021-11-29 13:02:54",
"balance": 0,
"total_profit": 0,
"total_bet": 0,
"betback_total": 0,
"bet_threshold": 0,
"total_trades": 0,
"total_deposit": 0,
"total_withdraw": 0,
"withdraw_limit": 0,
"csgo_playtime": 0,
"last_csgo_playtime_cache": "2016-07-27 23:20:03",
"trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=145926386&token=ABCDEF",
"trade_offer_token": "ABCDEF",
"ref_id": 0,
"total_referral_bet": 0,
"total_referral_commission": 0,
"ref_permission": 0,
"ref_earnings": 0,
"total_ref_earnings": 0,
"total_ref_count": 0,
"total_credit": 0,
"referral_code": "Artemis",
"referral_amount": 50,
"muted_until": 1632354690,
"mute_reason": "Other",
"admin": 0,
"super_mod": 0,
"mod": 0,
"utm_campaign": "",
"country": "",
"is_vac_banned": 2,
"steam_level": 343,
"last_steam_level_cache": "2021-11-30 07:41:07",
"whitelisted": 1,
"total_tips_received": 0,
"total_tips_sent": 0,
"withdrawal_fee_owed": "0.0000",
"flags": 0,
"ban": null,
"balances": [],
"level": 0,
"xp": 0,
"socket_token": "",
"user_hash": "",
"hashed_server_seed": "",
"intercom_hash": "",
"roles": [],
"eligible_for_free_case": false,
"extra_security_type": "2fa",
"total_bet_skincrash": 0,
"total_bet_matchbetting": 0,
"total_bet_roulette": 0,
"total_bet_coinflip": 0,
"total_bet_supershootout": 0,
"p2p_telegram_notifications_allowed": true,
"p2p_telegram_notifications_enabled": true,
"verified": false,
"hide_verified_icon": false,
"unread_notifications": [],
"last_session": {},
"email": "",
"email_verified": false,
"eth_deposit_address": "",
"btc_deposit_address": "",
"ltc_deposit_address": "",
"bch_deposit_address": "",
"steam_inventory_url": "https://steamcommunity.com/profiles/76561198106192114/inventory/#730",
"steam_api_key": "",
"has_crypto_deposit": true,
"chat_tag": {},
"linked_accounts": [],
"api_token": "nice try"
},
"socket_token": "",
"socket_signature": ""
}
````
Ratelimit
No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies.
[Back to contents]
Get Active Trades
URL: https://csgoempire.com/api/v2/trading/user/trades
Method: GET
Returns an array of all items currently being deposited or withdrawn by this account. This does not include bids placed on active items until the auction ends.
Example Request:
```bash
curl --location --request GET 'https://csgoempire.com/api/v2/trading/user/trades' \
--header 'Authorization: Bearer {API-KEY-HERE}'
````
Example Response:
```json
{
"success": true,
"data": {
"deposits": [
{
"id": 11203,
"service_name": "csgoempire",
"service_invoice_id": 920,
"user_id": 303119,
"item_id": 50755,
"items": [
{
"asset_id": 26876810352,
"created_at": "2022-10-14 13:54:35",
"custom_price_percentage": 0,
"full_position": 83,
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpovbSsLQJf3qr3czxb49KzgL-DjsjwN6vQglRd4cJ5nqeQ89mk2VHg_UpkYjj0JdLGdAFvNAvS81G6kLjq1pHtv5SdnHdhuCYq-z-DyHWIya-0",
"id": 50755,
"is_commodity": false,
"market_name": "★ M9 Bayonet | Forest DDPAT (Factory New)",
"market_value": 488.82,
"name_color": "8650AC",
"position": null,
"preview_id": null,
"price_is_unreliable": 1,
"tradable": true,
"tradelock": false,
"updated_at": "2022-10-18 08:46:45",
"wear": null
}
],
"total_value": 48882,
"security_code": "",
"tradeoffer_id": 0,
"trade_id": 2,
"status": 2,
"status_message": "",
"metadata": {
"auction_highest_bid": null,
"auction_highest_bidder": null,
"auction_number_of_bids": 0,
"auction_ends_at": 1666083002,
"auction_auto_withdraw_failed": null,
"price_updated_at": null,
"trade_url": null,
"partner": null,
"total_fee": null,
"fee": null,
"old_total_value": null,
"item_position_in_inventory": null,
"item_inspected": true,
"expires_at": null,
"delivery_time": null,
"phishingScamDetected": null,
"item_validation": null,
"penalty": null
},
"item_hash": "7d1cacdc3016c134e284ae253543cc3b0fd63942",
"created_at": "2022-10-18 08:47:02",
"updated_at": "2022-10-18 08:47:02"
}
],
"withdrawals": [
]
}
}
```
Ratelimit
3 requests per 10 seconds, block for 1 minute.
[Back to contents]
Get Active Auctions
URL: https://csgoempire.com/api/v2/trading/user/auctions
Method: GET
Returns an array of all auctions currently being bid on by this account.
Example Request:
```bash
curl --location --request GET 'https://csgoempire.com/api/v2/trading/user/auctions' \
--header 'Authorization: Bearer {API-KEY-HERE}'
```
Example Response:
```json
{
"success": true,
"active_auctions": [
{
"auction_ends_at": 1666083221,
"auction_highest_bid": 227,
"auction_highest_bidder": 303119,
"auction_number_of_bids": 1,
"custom_price_percentage": 0,
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXX7gNTPcUmqBwTTR7SQb37g5vWCwlxdFEC5uyncgZi0vGQJWwQudm0xtTexaD2ZOmClyVB5sL8h7mCHA",
"is_commodity": true,
"market_name": "Name Tag",
"market_value": 227,
"name_color": "D2D2D2",
"preview_id": null,
"price_is_unreliable": true,
"stickers": [
],
"wear": null,
"published_at": "2022-10-18T08:51:02.803761Z",
"id": 11204,
"depositor_stats": {
"delivery_rate_recent": 0.6,
"delivery_rate_long": 0.7567567567567568,
"delivery_time_minutes_recent": 7,
"delivery_time_minutes_long": 7,
"steam_level_min_range": 5,
"steam_level_max_range": 10,
"user_has_trade_notifications_enabled": false,
"user_is_online": null
},
"above_recommended_price": -5
}
]
}
```
Ratelimit
No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies.
[Back to contents]
Settings
URL: https://csgoempire.com/api/v2/trading/user/settings
Method: POST
Used to update your tradelink and/or Steam API key
Inputs:
- trade_url (required): string, your steam trade url
- steam_api_key : string, your steam api key
Example Request:
```bash
curl --location --request POST 'https://csgoempire.com/api/v2/trading/user/settings' \
--header 'Authorization: Bearer {API-KEY-HERE}' \
--header 'Content-Type: application/json' \
--data-raw '{"trade_url":"https://steamcommunity.com/tradeoffer/new/?partner=145926386&token=zYMYgbXB"}'
```
Example Response:
```json
{
"success": true,
"escrow_seconds": 0
}
```
Ratelimit
No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies.
[Back to contents]
Transaction History
URL: https://csgoempire.com/api/v2/user/transactions?page={page_number}
Method: GET
Used to get your transaction history.
Inputs:
- page_number : int, the page you wish to get
Example Request:
```bash
curl --location --request GET 'https://csgoempire.com/api/v2/user/transactions?page=1' \
--header 'Authorization: Bearer {API-KEY-HERE}'
```
Example Response:
```json
{
"current_page": 1,
"data": [
{
"id": 54773614,
"key": "withdrawal_invoices",
"type": "Steam Auction Bid Withdrawal",
"balance": 17543153,
"delta": -227,
"balance_after": 17542926,
"timestamp": 1666083061.355,
"timestamp_raw": 1666083061355,
"date": "2022-10-18 08:51:01",
"invoice_id": null,
"data": {
"id": 69,
"processor_name": "Steam",
"status": 200,
"status_name": "Created",
"metadata": {
"deposit_id": 11204,
"payment_method": "auction_bid",
"id": 11204,
"auction_highest_bid": 227,
"auction_highest_bidder": 303119,
"auction_number_of_bids": 1,
"auction_ends_at": 1666083221
}
}
}
],
"first_page_url": "user/transactions?page=1",
"from": 1,
"last_page": 2499,
"last_page_url": "user/transactions?page=2499",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "user/transactions?page=1",
"label": "1",
"active": true
},
{
"url": "user/transactions?page=2",
"label": "2",
"active": false
},
{
"url": "user/transactions?page=3",
"label": "3",
"active": false
},
{
"url": "user/transactions?page=4",
"label": "4",
"active": false
},
{
"url": "user/transactions?page=5",
"label": "5",
"active": false
},
{
"url": "user/transactions?page=6",
"label": "6",
"active": false
},
{
"url": "user/transactions?page=7",
"label": "7",
"active": false
},
{
"url": "user/transactions?page=8",
"label": "8",
"active": false
},
{
"url": "user/transactions?page=9",
"label": "9",
"active": false
},
{
"url": "user/transactions?page=10",
"label": "10",
"active": false
},
{
"url": null,
"label": "...",
"active": false
},
{
"url": "user/transactions?page=2498",
"label": "2498",
"active": false
},
{
"url": "user/transactions?page=2499",
"label": "2499",
"active": false
},
{
"url": "user/transactions?page=2",
"label": "Next »",
"active": false
}
],
"next_page_url": "user/transactions?page=2",
"path": "user/transactions",
"per_page": 1,
"prev_page_url": null,
"to": 1,
"total": 2499
}
```
Ratelimit
No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies.
[Back to contents]
Blocking Users
Blocking a User
URL: https://csgoempire.com/api/v2/trading/block-list/{steam_id}
Method: POST
Used to block a user, preventing them from trading with you, and you with them.
Inputs:
- steam_id : string, the users steam ID
Example Request:
```bash
curl --location --request POST 'https://csgoempire.com/api/v2/trading/block-list/76561197960287930' \
--header 'Authorization: Bearer {API-KEY-HERE}'
```
Example Response:
```json
{
"success": true,
}
```
Ratelimit
No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies.
[Back to contents]
Unblocking a User
URL: https://csgoempire.com/api/v2/trading/block-list/{steam_id}
Method: DELETE
Used to unblock a user, allowing them to trade with you, and you with them.
Inputs:
- steam_id : string, the users steam ID
Example Request:
```bash
curl --location --request DELETE 'https://csgoempire.com/api/v2/trading/block-list/76561197960287930' \
--header 'Authorization: Bearer {API-KEY-HERE}'
```
Example Response:
```json
{
"success": true,
}
```
Ratelimit
No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies.
[Back to contents]
View all blocked users
URL: https://csgoempire.com/api/v2/trading/block-list
Method: GET
Used to get a list of all currently blocked users.
Example Request:
```bash
curl --location --request GET 'https://csgoempire.com/api/v2/trading/block-list' \
--header 'Authorization: Bearer {API-KEY-HERE}'
```
Example Response:
```json
[
{
"id": 1,
"blocker_user_id": 76561198106192114,
"blocked_user_id": 76561197960287930,
"created_at": "2022-02-15 11:57:08",
"updated_at": "2022-02-15 11:57:08"
}
]
```
Ratelimit
No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies.
[Back to contents]
Deposits
Get CSGO Inventory
URL: https://csgoempire.com/api/v2/trading/user/inventory
Method: GET
Fetch your inventory from steam and caches it to the database for 1 hour.
Inputs:
- invalid : yes|no - Filters invalid items, defaults to no filtering
Example Request:
```bash
curl --location --request GET 'https://csgoempire.com/api/v2/trading/user/inventory' \
--header 'Authorization: Bearer {API-KEY-HERE}'
```
Example Response:
```json
{
"success": true,
"updatedAt": 1666082810,
"allowUpdate": true,
"data": [
{
"asset_id": 26876810352,
"created_at": "2022-10-14 13:54:35",
"custom_price_percentage": null,
"full_position": 83,
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpovbSsLQJf3qr3czxb49KzgL-DjsjwN6vQglRd4cJ5nqeQ89mk2VHg_UpkYjj0JdLGdAFvNAvS81G6kLjq1pHtv5SdnHdhuCYq-z-DyHWIya-0",
"id": 50755,
"invalid": "This item is currently in an active deposit.",
"is_commodity": false,
"market_name": "★ M9 Bayonet | Forest DDPAT (Factory New)",
"market_value": 48882,
"name_color": "8650AC",
"position": null,
"preview_id": "43246cdca7fe",
"price_is_unreliable": 1,
"stickers": [],
"tradable": true,
"tradelock": false,
"updated_at": "2022-10-18 08:46:45",
"wear": 0.064
},
{
"asset_id": 27299195480,
"created_at": "2022-10-14 13:54:34",
"custom_price_percentage": null,
"full_position": 27,
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou7uifDhnwMzFcDoV09ajh5SClPLLP7LWnn8f7sZ1ib6S9I6i3w21qUNlYDymI9KcclI3YAvRr1Ltwujm18TvtMnPzGwj5Hdb1VS4mQ",
"id": 50696,
"is_commodity": false,
"market_name": "StatTrak™ MAG-7 | Justice (Factory New)",
"market_value": 3267,
"name_color": "CF6A32",
"position": 2,
"preview_id": null,
"price_is_unreliable": 0,
"stickers": [
{
"sticker_id": 3453,
"wear": null,
"name": "Legendary Eagle Master (Holo)",
"image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulROR0XcS-O_2NrDbF51NRdCur_qJwJt7PvHfTJ94N2kk4XFw_OhZbmAxWhT7Zcp3u2TpIqmilDl8hZsMjylJoHEIAA9ZQ2B-1W-xfCv28G5r0_B7Q"
}
],
"tradable": true,
"tradelock": false,
"updated_at": "2022-10-18 08:46:45",
"wear": 0.068
}
]
}
```
Ratelimit
No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies.
[Back to contents]
Get Unique Info
URL: https://csgoempire.com/api/v2/trading/user/inventory/unique-info
Method: GET
Get inspected unique info for items in user inventory. Examples include float/sticker data
Example Request:
```bash
curl --location --request GET 'https://csgoempire.com/api/v2/trading/user/inventory/unique-info' \
--header 'Authorization: Bearer {API-KEY-HERE}'
```
Example Response:
```json
{
"success": true,
"data": [
{
"id": 50696,
"asset_id": 27299195480,
"wear": 0.068,
"stickers": [
{
"slot": 0,
"sticker_id": 3453,
"wear": null,
"scale": null,
"rotation": null,
"tint_id": null,
"name": "Legendary Eagle Master (Holo)",
"image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulROR0XcS-O_2NrDbF51NRdCur_qJwJt7PvHfTJ94N2kk4XFw_OhZbmAxWhT7Zcp3u2TpIqmilDl8hZsMjylJoHEIAA9ZQ2B-1W-xfCv28G5r0_B7Q"
}
]
},
{
"id": 50697,
"asset_id": 27297587028,
"wear": 0.392,
"stickers": [
]
}
}
```
Ratelimit
No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies.
[Back to contents]
Create Deposit
URL: https://csgoempire.com/api/v2/trading/deposit
Method: POST
List an item(s) for sale.
Inputs:
- Items: (required) array with array elements: [id: itemId, coin_value: int] (Max 20 per request)
Notes:
- coin_value is in coin cents, so 100.01 coins is represented as 10001
- coin_value should be the price you want to list at. If you want to list at 100.01 coins, you should set coin_value to 10001. See below for how to calculate the coin value.
- the frontend works differently, use how these docs suggest, the requests are smaller and therefore faster than the frontend.
- you should be chunking these requests into groups of 20, but it's not required. If you don't chunk, you'll list slower and hit ratelimits more often.
- Individual deposit state's will be announced to the websocket, so monitor that to see when your items are listed. Errors will use the key
deposit_failed
and will contain the item id and error message.
Pricing example:
percent = 5
market_price = 10001
price = round(market_price * (percent/100+1))
item = {
"id": 3731677705,
"coin_value": price
}
Example Input:
```json
{
"items": [
{
"id": 3731677704,
"coin_value": 576811
},
{
"id": 3731677705,
"coin_value": 52811
}
]
}
```
Example Request:
y>
```bash
curl --location --request POST 'https://csgoempire.com/api/v2/trading/deposit' \
--header 'Authorization: Bearer {API-KEY-HERE}' \
--header 'Content-Type: application/json' \
--data-raw '{"items":[{"id":50755,"coin_value":48882}]}'
```
Example Response:
```json
{
"success": true
}
```
Ratelimit
20 requests per 10 seconds, block for 1 minute.
[Back to contents]
Cancel Deposit
URL: https://csgoempire.com/api/v2/trading/deposit/{DEPOSIT-ID}/cancel
Method: POST
Cancels processing deposit without any bids. Once a bid has been placed items are no longer eligible to be cancelled.
Example Request:
```bash
curl --location --request POST 'https://csgoempire.com/api/v2/trading/deposit/28391470/cancel' \
--header 'Authorization: Bearer {API-KEY-HERE}'
```
Example Response:
```json
{
"success": true
}
```
Ratelimit
Success: Global ratelimit
Error: 20 requests per 10 seconds, block for 1 minute.
[Back to contents]
Cancel Multiple Deposits
URL: https://csgoempire.com/api/v2/trading/deposit/cancel
Method: POST
Cancels processing multiple deposit without any bids. Once a bid has been placed items are no longer eligible to be cancelled.
Inputs:
- Array of deposits ids (required) : integer
Example Request:
curl --location --request POST 'https://csgoempire.com/api/v2/trading/deposit/cancel' \
--header 'Authorization: Bearer {API-KEY-HERE}' \
--data-raw '{"ids":[10001, 10002, 10003, 10004, 10005]}'
Example Response:
```json
{
"success": true,
"data": {
"10001": {"success":false,"message":"You don't have a cancellable deposit."},
"10002": {"success":true},
"10003": {"success":true},
"10004": {"success":true},
"10005": {"success":false,"message":"You don't have a cancellable deposit."}
}
}
```
Ratelimit
Success: Global ratelimit
Error: 20 requests per 10 seconds, block for 1 minute.
[Back to contents]
Sell Now
URL: https://csgoempire.com/api/v2//trading/deposit/{deposit_id}/sell
Method: POST
Sell an item immediately.
Inputs:
- deposit_id (required) : integer - Required in the URL
Example Request:
```bash
curl --location --request POST 'https://csgoempire.com/api/v2/trading/deposit/28393316/sell' \
--header 'Authorization: Bearer {API-KEY-HERE}'
```
Example Response:
```json
{
"success": true,
"auction_data": {
"id": 28393316,
"app_id": 730,
"auction_highest_bid": 54,
"auction_highest_bidder": 2700170,
"auction_number_of_bids": 2,
"auction_ends_at": 1638273900
}
}
```
Ratelimit
No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies.
[Back to contents]
Withdraw
Get Listed Items
URL: https://csgoempire.com/api/v2/trading/items
Method: GET
Get a list of all items listed on the withdrawals page
Inputs:
- per_page - (required), number. How many items to fetch. Min is 1 and max is 200 for guests and 2500 for logged in user
- page - (required), number. Page to fetch.
- search - string. Item market name to search. 2 char min length.
- order - string. Field to use for ordering supported fields: market_value
- sort - string. Sorting asc or desc. Default asc
- auction - string. Auction only, yes/no, defaults to no.
- price_min - number. Minimum item current price.
- price_max - number. Maximum item current price.
- price_max_above - number. Maximum item percentage to show.
- wear_min - number (0-1). Minimum float wear value.
- wear_max - number (0-1). Maximum float wear value.
- delivery_time_long_min - number. Minimum delivery time average from the last 100 items.
- delivery_time_long_max - number. Maximum delivery time average from the last 100 items.
- has_stickers - yes/no. Filters for items that have stickers.
- is_commodity - yes/no. Filters for items that are commodities. Cannot have wear/sticker based filters.
Example Request:
```bash
curl --location --request GET 'https://csgoempire.com/api/v2/trading/items?per_page=10&page=1&price_max_above=15&sort=desc&order=market_value' \
--header 'Authorization: Bearer {API-KEY-HERE}'
```
Example Response:
```json
{
"current_page": 1,
"data": [
{
"auction_ends_at": 1665762091,
"auction_highest_bid": null,
"auction_highest_bidder": null,
"auction_number_of_bids": 0,
"custom_price_percentage": 0,
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou-6kejhnwMzFJQJE4NOhkZKYqPrxN7LEmyVQ7JMkieiTp92sjAzs_hc4Nm_7LdCcdQdrNVrU_gK6xOnt0MO4tZvP1zI97XHPMlL3",
"is_commodity": false,
"market_name": "StatTrak™ M4A4 | Spider Lily (Well-Worn)",
"market_value": 240,
"name_color": "CF6A32",
"preview_id": "3d33db497b7b",
"price_is_unreliable": false,
"stickers": [],
"wear": 0.431,
"published_at": "2022-10-14T15:38:33.947439Z",
"id": 11196,
"depositor_stats": {
"delivery_rate_recent": 1,
"delivery_rate_long": 0.9565217391304348,
"delivery_time_minutes_recent": 2,
"delivery_time_minutes_long": 3,
"steam_level_min_range": 5,
"steam_level_max_range": 10,
"user_has_trade_notifications_enabled": false,
"user_is_online": null
},
"above_recommended_price": -6
}
],
"first_page_url": "http://csgoempire.com/api/trading/items?per_page=10&price_max_above=15&sort=desc&order=market_value&page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://csgoempire.com/api/trading/items?per_page=10&price_max_above=15&sort=desc&order=market_value&page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://csgoempire.com/api/trading/items?per_page=10&price_max_above=15&sort=desc&order=market_value&page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "http://csgoempire.com/api/trading/items",
"per_page": "10",
"prev_page_url": null,
"to": 1,
"total": 1
}
```
Ratelimit
20 requests per 10 seconds if not searching, 3 requests per 10 seconds if searching
[Back to contents]
Get Depositor Stats
URL: https://csgoempire.com/api/v2/trading/deposit/{DEPOSIT_ID}/stats
Method: GET
Get the depositing users stats from a unique deposit ID
Inputs:
- deposit_id (required) : integer - Required in the URL
Example Request:
```bash
curl --location --request GET 'https://csgoempire.com/api/v2/trading/deposit/28079776/stats' \
--header 'Authorization: Bearer {API-KEY-HERE}'
```
Example Response:
```json
{
"delivery_rate_recent": 1,
"delivery_rate_long": 1,
"delivery_time_minutes_recent": null,
"delivery_time_minutes_long": null,
"steam_level_min_range": 100,
"steam_level_max_range": 5000,
"user_has_trade_notifications_enabled": false,
"user_is_online": null
}
```
Ratelimit
No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies.
[Back to contents]
Create Withdrawal
URL: https://csgoempire.com/api/v2/trading/deposit/{DEPOSIT_ID}/withdraw
Method: POST
Withdraw item directly if the auction has expired without being won.
Inputs:
- deposit_id (required) : integer - Required in the URL
- coin_value (required) : integer - The item price.
Example Request:
```bash
curl --location --request POST 'https://csgoempire.com/api/v2/trading/deposit/28396506/withdraw' \
--header 'Authorization: Bearer {API-KEY-HERE}' \
--header 'Content-Type: application/json' \
--data-raw '{"coin_value":64}'
```
Example Response:
```json
{
"success": true,
"data": {
"id": 13745535,
"user_id": 303119,
"item_id": null,
"items": [
{
"app_id": 730,
"created_at": 1638267229,
"custom_price_percentage": null,
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulROWEPTTOz_h52CHFp7ITtRubOpZVZh1vGbJW0Xuoq3zdiKxfKsNunVxj1TsMEk3LmS9930jQPnqEI6NW3tZNjC2hpzSfU",
"id": 28387732,
"img": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulROWEPTTOz_h52CHFp7ITtRubOpZVZh1vGbJW0Xuoq3zdiKxfKsNunVxj1TsMEk3LmS9930jQPnqEI6NW3tZNjC2hpzSfU",
"is_commodity": true,
"market_name": "Sticker | GODSENT (Foil) | Stockholm 2021",
"market_value": 0.41,
"name": "Sticker | GODSENT (Foil) | Stockholm 2021",
"name_color": "D2D2D2",
"paint_index": null,
"preview_id": null,
"price_is_unreliable": false,
"tradable": true,
"tradelock": false,
"type": "Exotic Sticker",
"updated_at": "2021-11-30 13:41:36",
"wear": null
}
],
"total_value": 41,
"security_code": "",
"tradeoffer_id": 28387732,
"trade_id": 2,
"status": 4,
"status_message": "Confirming",
"metadata": {
"auction_highest_bid": null,
"auction_highest_bidder": null,
"auction_number_of_bids": 0,
"auction_ends_at": 1638267409,
"auction_auto_withdraw_failed": null,
"price_updated_at": null,
"trade_url": null,
"partner": null,
"total_fee": null,
"fee": null,
"old_total_value": null,
"item_position_in_inventory": 2,
"item_inspected": false,
"steam_id": "76561198106192114",
"expires_at": null,
"delivery_time": null,
"phishingScamDetected": null,
"item_validation": null,
"possible_abuse_detected_at": null,
"penalty": null,
"service_name": "csgoempire",
"service_invoice_id": 3881481
},
"created_at": "2021-11-30 13:46:29",
"updated_at": "2021-11-30 13:46:29"
},
"invoice": {
"user_id": 303119,
"status": 201,
"processor_id": 1,
"currency_id": 1,
"amount_coins": 41,
"metadata": {
"deposit_id": 28387732
},
"ip": "0.0.0.0",
"updated_at": "2021-11-30 13:46:29",
"created_at": "2021-11-30 13:46:27",
"id": 5191251,
"processor_txid": "13745535",
"user": {
"id": 303119,
"steam_id": "76561198106192114",
"steam_id_v3": "145926386",
"steam_name": "Artemis",
"avatar": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/4f/4f619bc788f0d41261d2a5ced0e96a281af88479_full.jpg",
"profile_url": "https://steamcommunity.com/id/G0FastMen/",
"registration_timestamp": "2016-07-27 23:20:03",
"registration_ip": "0.0.0.0",
"last_login": "2021-11-29 13:02:54",
"balance": 0,
"total_profit": 0,
"total_bet": 0,
"betback_total": 0,
"bet_threshold": 0,
"total_trades": 0,
"total_deposit": 0,
"total_withdraw": 0,
"withdraw_limit": 0,
"csgo_playtime": 0,
"last_csgo_playtime_cache": "2016-07-27 23:20:03",
"trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=145926386&token=ABCDEF",
"trade_offer_token": "ABCDEF",
"ref_id": 0,
"total_referral_bet": 1,
"total_referral_commission": 1,
"ref_permission": 1,
"ref_earnings": 0,
"total_ref_earnings": 1,
"total_ref_count": 0,
"total_credit": 1,
"referral_code": null,
"referral_amount": 50,
"muted_until": 1632354690,
"mute_reason": "Other",
"admin": 0,
"super_mod": 0,
"mod": 0,
"utm_campaign": "",
"country": "",
"is_vac_banned": 2,
"steam_level": 343,
"last_steam_level_cache": "2021-11-30T13:46:29.814674Z",
"whitelisted": 1,
"total_tips_received": 0,
"total_tips_sent": 0,
"withdrawal_fee_owed": "0.0000",
"flags": 704,
"encrypted_fields": [],
"balances": [],
"kyc": [],
"steam_data": {
"user_id": 303119,
"timecreated": 1378522915
}
},
"status_name": "Processing",
"processor_name": "Steam P2P"
}
}
```
Ratelimit
Success: 8 requests per 10 seconds, block for 1 minute
Failure: 2 per 10 seconds, block for 1 minute
[Back to contents]
Place Bid
URL: https://csgoempire.com/api/v2/trading/deposit/{DEPOSIT_ID}/bid
Method: POST
Place a bid on an auction.
Inputs:
- bid_value (required) : integer, the amount of coins to bid.
Example Request:
```bash
curl --location --request POST 'https://csgoempire.com/api/v2/trading/deposit/28396506/bid' \
--header 'Authorization: Bearer {API-KEY-HERE}' \
--header 'Content-Type: application/json' \
--data-raw '{"bid_value":64}'
```
Example Response:
```json
{
"success": true,
"auction_data": {
"id": 28396506,
"app_id": 730,
"auction_highest_bid": 64,
"auction_highest_bidder": 303119,
"auction_number_of_bids": 11,
"auction_ends_at": 1638279554
},
"invoice": {
"user_id": 303119,
"status": 200,
"processor_id": 1,
"currency_id": 1,
"amount_coins": 64,
"metadata": {
"deposit_id": 28396506
},
"ip": "0.0.0.0",
"updated_at": 1638279494,
"created_at": 1638279490,
"id": 5190329,
"processor_ref": "15064711",
"status_name": "CREATED",
"processor_name": "Steam P2P",
"currency_code": "CSGOEMPIRE_COIN",
"complete_at": null,
"refunded_at": null
}
}
```
Ratelimit
Success: 20 requests per 10 seconds, block for 1 minute
Failure: 20 per 10 seconds, block for 1 minute
[Back to contents]
Cancel Withdrawal
URL: https://csgoempire.com/api/trading/user/withdrawals/{WITHDRAWAL_ID}
Method: DELETE
Cancel a withdrawal if unsent and past the 30 minute mark.
Example Request:
```bash
curl --location --request DELETE 'https://csgoempire.com/api/trading/user/withdrawals/12345' \
--header 'Authorization: Bearer {API-KEY-HERE}' \
--header 'Content-Type: application/json'
```
Example Response:
```json
{
"success": true
}
```
Ratelimit
No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies.
[Back to contents]
Websocket
Connect To Websocket
URL: wss://trade.csgoempire.com/s/?EIO=3&transport=websocket
Example code for connecting to the websocket can be found here
Note:
Connecting to the socket requires Socket.IO v2.x Client
[Back to contents]
Websocket Authentication
The socket can be used as unauthenticated but if you want to receive trade updates you need to auth. To authenticate you need to emit identify event with the data:
Example Frame:
```json
{
"uid": ,
"model": { ...user_model },
"authorizationToken": ,
"signature": ,
"uuid":
}
```
See metadata on how to get the required socket auth data.
This returns the following:
Example Response:
```json
[
"init",
{
"authenticated":true,
"serverTime":"2021-11-30T08:30:09.443Z",
"server":"trade:slave-server:GpOfWK",
"id":303119,
"steam_name":"Artemis",
"steam_id":"76561198106192114",
"verified":false,
"hide_verified_icon":false,
"avatar":"https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/4f/4f619bc788f0d41261d2a5ced0e96a281af88479_full.jpg",
"profile_url":"https://steamcommunity.com/id/G0FastMen/",
"balance":1533471521,
"bet_threshold":0,
"total_bet":2147483647,
"total_deposit":2182538,
"withdraw_limit":234118685,
"ref_id":0,
"referral_code":"Artemis",
"muted_until":0,
"mute_reason":"",
"utm_campaign":"",
"is_vac_banned":2,
"whitelisted":false,
"registration_ip":"0.0.0.0",
"steam_level":343,
"registration_timestamp":"2016-07-27 23:20:03",
"total_profit":-689280648,
"roles":[
"super-mod",
"tester",
"support-manager",
"root",
"matchbetting-beta",
"shark",
"admin",
"manager",
"mod"
],
"chat_tag":null,
"uid":303119,
"helper_mod":false,
"mod":true,
"super_mod":true,
"admin":true,
"qa":false,
"deposited":true,
"lvl":119,
"badge_text":null,
"badge_text_localized":null,
"badge_color":null,
"hide_rank":null,
"name":"Artemis"
}
]
```
After you're identified you'll want to submit the default filters to subscribe to item updates. Without this being emitted, item updates will not be sent to you.
To do this, emit the following:
Filters:
```json
{
"price_max": 9999999
}
```
In most languages, this will look something like emit('filters', {'price_max': 9999999});
.
[Back to contents]
Websocket Events
All websocket events can be either a single item OR an array containing multiple items.
timesync
Syncing server timestamp. It is not emitted unless the client asks it by sending timesync event.
Event sample:
```json
["timesync",1619682261540]
```
[Back to contents]
new_item
Emitted when a new item is available.
Event sample:
```json
[
"new_item",
[
{
"auction_ends_at": 1682284226,
"auction_highest_bid": null,
"auction_highest_bidder": null,
"auction_number_of_bids": 0,
"custom_price_percentage": 197,
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgposr-kLAtl7PLFTj9Q49Kskb-Yh_bmOLfUqWdY781lxL2T8Y-kjAa2qhZlNmz7ItCSd1I4ZVrVrFi6kO_mgJa9uJXAyHdguXI8pSGKoKTrgPA",
"is_commodity": false,
"market_name": "Desert Eagle | Bronze Deco (Factory New)",
"market_value": 353,
"name_color": "D2D2D2",
"preview_id": null,
"price_is_unreliable": false,
"stickers": [
{
"sticker_id": 377,
"wear": null,
"name": "Kawaii Killer Terrorist",
"image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulReQ0HdUuqkw9aDARJ_JBNWv7OuIgts1uH3ZQJO7c6xkc6PkaOkYe2Ik2hVsJIgibqV9t2hjAy28kJpNWjzIYGXd1JoNA6G_lHv366x0hEUSJjM"
},
{
"sticker_id": 965,
"wear": null,
"name": "Merietta",
"image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulRNRULFV_eS1M7DQEh4IEtas6isLhN00szEcC9F6ZLux9ONzvP3Y-yJwTtX6pQj3-uWp9qs2A3n-kRkMjvxLNWcegNqYQ7Z5BHgliqAJ7zD"
}
],
"wear": 0.053,
"published_at": "2023-04-23T21:07:36.874150Z",
"id": 148843931,
"depositor_stats": {
"delivery_rate_recent": 1,
"delivery_rate_long": 0.99,
"delivery_time_minutes_recent": 0,
"delivery_time_minutes_long": 17,
"steam_level_min_range": 5,
"steam_level_max_range": 10,
"user_has_trade_notifications_enabled": true,
"user_is_online": null
},
"above_recommended_price": 191,
"purchase_price": 353
},
{
"auction_ends_at": 1682284227,
"auction_highest_bid": null,
"auction_highest_bidder": null,
"auction_number_of_bids": 0,
"custom_price_percentage": 14,
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpot7HxfDhjxszJemkV09G3h5SOhe7LPr7Vn35cpsEl0-2Xrdii3APt-RI4ZG71IdOXelJoZVDX_li7kOu-1MW6uZ_JyHV9-n51hRUaMfs",
"is_commodity": false,
"market_name": "AK-47 | Elite Build (Field-Tested)",
"market_value": 266,
"name_color": "D2D2D2",
"preview_id": null,
"price_is_unreliable": false,
"stickers": [
{
"sticker_id": 5132,
"wear": null,
"name": "Perfecto | Stockholm 2021",
"image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulROWEPTTOz_h52CHE59IjtHs6ijLgR03MzEcC9F6ZLmwdPTlqGjau7XxWoGvJRz272Uotqh3FLmrkBvMTvzJNWUdw8_NQqD5BHgljRT2dJr"
},
{
"sticker_id": 4777,
"wear": null,
"name": "Liquid | 2020 RMR",
"image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulRPQV6CF7b9mMPaQmJ4JBZQs_Skf1Q41afJdTsX796zlYPclaWtMr3Vwm1XuJcpj-uRrdml3ADkqkNrfSmtc1IIUOC7"
},
{
"sticker_id": 4536,
"wear": 0.7532175183296204,
"name": "Extermination",
"image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulRVTUDfCOG1w8rBXlR6JBBeubSaJwZy1PaGcmUTvI_hzNnSwPb2ZbmEkm4EuJUj276Xo4-mjgew-0BpZG-gcNTDIBh-Pw_rXqC9BQ"
},
{
"sticker_id": 923,
"wear": 0.6144185066223145,
"name": "Flipsid3 Tactics | Cluj-Napoca 2015",
"image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulReQFnaFbT8goDVX1RkGghWpL2gZVVm16DOdT5G7t3kxobawPakN-uIwzgDv5Ap0rmVrNyk3FG1-EA-MmjtZNjCmcnHFc4"
}
],
"wear": 0.346,
"published_at": "2023-04-23T21:07:37.029237Z",
"id": 148843957,
"depositor_stats": {
"delivery_rate_recent": 1,
"delivery_rate_long": 0.99,
"delivery_time_minutes_recent": 0,
"delivery_time_minutes_long": 17,
"steam_level_min_range": 5,
"steam_level_max_range": 10,
"user_has_trade_notifications_enabled": true,
"user_is_online": null
},
"above_recommended_price": 8,
"purchase_price": 266
},
{
"auction_ends_at": 1682284229,
"auction_highest_bid": null,
"auction_highest_bidder": null,
"auction_number_of_bids": 0,
"custom_price_percentage": 11,
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpovbSsLQJf3qr3czxb49KzgL-Khsj2P67UklRc7cF4n-SP9tXw3gLl-BZvamGhIIDAIwQ8NAyB_1C8wO-61pfvup_By3Yw63Uj7GGdwUKpIv7t7w",
"is_commodity": false,
"market_name": "★ M9 Bayonet | Blue Steel (Field-Tested)",
"market_value": 106933,
"name_color": "8650AC",
"preview_id": "13bbfe513e9c",
"price_is_unreliable": false,
"stickers": [],
"wear": 0.18,
"published_at": "2023-04-23T21:07:37.118648Z",
"id": 148844032,
"depositor_stats": {
"delivery_rate_recent": 1,
"delivery_rate_long": 1,
"delivery_time_minutes_recent": 1,
"delivery_time_minutes_long": 2,
"steam_level_min_range": 100,
"steam_level_max_range": 5000,
"user_has_trade_notifications_enabled": false,
"user_is_online": null
},
"above_recommended_price": 5,
"purchase_price": 106933
}
]
]
```
[Back to contents]
updated_item
Emitted when an existing item has been updated. For example, if status changes.
Event sample:
```json
["updated_item", {
"app_id": 730,
"auction_auto_withdraw_failed": null,
"auction_ends_at": 1631921311,
"auction_highest_bid": null,
"auction_highest_bidder": null,
"auction_number_of_bids": 0,
"custom_name": null,
"description_type": "Souvenir Mil-Spec Grade SMG",
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou6r8FAZu7OHNdQJO5du-gM7bwqb2MeuClTsCv8Ek2LiZ9t2giwa28hVlZGD0doSUIANqYV_U_gC2366x0j0WoURS",
"img": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou6r8FAZu7OHNdQJO5du-gM7bwqb2MeuClTsCv8Ek2LiZ9t2giwa28hVlZGD0doSUIANqYV_U_gC2366x0j0WoURS",
"is_commodity": false,
"market_name": "Souvenir MP9 | Hot Rod (Factory New)",
"market_value": 3394,
"name": "Souvenir MP9 | Hot Rod (Factory New)",
"name_color": "FFD700",
"paint_index": null,
"paint_seed": null,
"preview_id": null,
"price_is_unreliable": 0,
"stickers": [],
"tradable": true,
"tradelock": false,
"updated_at": "2021-09-17 23:15:33",
"wear": null,
"published_at": "2021-09-17T23:25:31.111700Z",
"id": 10003,
}]
```
[Back to contents]
auction_update
Emitted when someone places a bid for an auction item.
Event sample:
```json
[
{
"id": 148844336,
"above_recommended_price": 10,
"auction_highest_bid": 79,
"auction_highest_bidder": 3894061,
"auction_number_of_bids": 11,
"auction_ends_at": 1682284308
},
{
"id": 148844305,
"above_recommended_price": 18,
"auction_highest_bid": 35,
"auction_highest_bidder": 2678443,
"auction_number_of_bids": 7,
"auction_ends_at": 1682284301
},
{
"id": 148844241,
"above_recommended_price": 14,
"auction_highest_bid": 203,
"auction_highest_bidder": 7905183,
"auction_number_of_bids": 17,
"auction_ends_at": 1682284289
}
]
```
[Back to contents]
deleted_item
Emitted when the item is not anymore available for withdrawing. Eg. the auction ends and the winner withdraws it. Contains an array of ids.
Event sample:
```json
[
"deleted_item",
[
91997374,
92044606,
92019018,
92044607,
91997376,
92044608,
91997377
]
]
```
[Back to contents]
trade_status
Emitted when the trade status gets updated.
Event sample:
```json
[
"trade_status",
[
{
"type": "withdrawal",
"data": {
"status": 6,
"status_message": "Completed",
"id": 19179038,
"item_id": 148842604,
"tradeoffer_id": 148842604,
"item": {
"market_name": "Sticker | Tyloo | Stockholm 2021",
"market_value": 0.31
},
"total_value": 35
}
}
]
]
```
[Back to contents]
deposit_failed
Emitted when a deposit fails
Event sample:
```json
[
"deposit_failed",
[
{
"response": {
"data": {
"success": false,
"message": "\"Sticker | device (Gold) | Boston 2018\" (ID 3517043328) already exists in another deposit by you. Please select a different item.",
"error_key": "item_already_deposited",
"item_id": 30013
},
"status": 400,
"statusText": "Bad Request"
}
}
]
```
[Back to contents]