├── examples ├── .gitignore └── websocket │ ├── package.json │ └── websocket-connection.js └── README.md /examples/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | yarn.lock -------------------------------------------------------------------------------- /examples/websocket/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "csgoempire-code-websocket", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "websocket-connection.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "axios": "^0.21.1", 13 | "socket.io-client": "^2.4.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/websocket/websocket-connection.js: -------------------------------------------------------------------------------- 1 | const io = require('socket.io-client'); 2 | const axios = require('axios'); 3 | 4 | // Replace "YOUR API KEY HERE" with your API key 5 | const csgoempireApiKey = "YOUR API KEY HERE"; 6 | 7 | // Replace domain to '.gg' if '.com' is blocked 8 | const domain = "csgoempire.com" 9 | 10 | const socketEndpoint = `wss://trade.${domain}/trade`; 11 | 12 | // Set the authorization header for all axios requests to the CSGOEmpire API Key 13 | axios.defaults.headers.common['Authorization'] = `Bearer ${csgoempireApiKey}`; 14 | 15 | // Function for connecting to the web socket 16 | async function initSocket() { 17 | 18 | console.log("Connecting to websocket..."); 19 | 20 | try { 21 | // Get the user data from the socket 22 | const userData = (await axios.get(`https://${domain}/api/v2/metadata/socket`)).data; 23 | 24 | // Initalize socket connection 25 | const socket = io( 26 | socketEndpoint, 27 | { 28 | transports: ["websocket"], 29 | path: "/s/", 30 | secure: true, 31 | rejectUnauthorized: false, 32 | reconnect: true, 33 | extraHeaders: { 'User-agent': `${userData.user.id} API Bot` } //this lets the server know that this is a bot 34 | } 35 | ); 36 | 37 | socket.on('connect', async () => { 38 | 39 | // Log when connected 40 | console.log(`Connected to websocket`); 41 | 42 | // Handle the Init event 43 | socket.on('init', (data) => { 44 | if (data && data.authenticated) { 45 | console.log(`Successfully authenticated as ${data.name}`); 46 | 47 | // Emit the default filters to ensure we receive events 48 | socket.emit('filters', { 49 | price_max: 9999999 50 | }); 51 | 52 | } else { 53 | // When the server asks for it, emit the data we got earlier to the socket to identify this client as the user 54 | socket.emit('identify', { 55 | uid: userData.user.id, 56 | model: userData.user, 57 | authorizationToken: userData.socket_token, 58 | signature: userData.socket_signature 59 | }); 60 | } 61 | }) 62 | 63 | // Listen for the following event to be emitted by the socket after we've identified the user 64 | socket.on('timesync', (data) => console.log(`Timesync: ${JSON.stringify(data)}`)); 65 | socket.on('new_item', (data) => console.log(`new_item: ${JSON.stringify(data)}`)); 66 | socket.on('updated_item', (data) => console.log(`updated_item: ${JSON.stringify(data)}`)); 67 | socket.on('auction_update', (data) => console.log(`auction_update: ${JSON.stringify(data)}`)); 68 | socket.on('deleted_item', (data) => console.log(`deleted_item: ${JSON.stringify(data)}`)); 69 | socket.on('trade_status', (data) => console.log(`trade_status: ${JSON.stringify(data)}`)); 70 | socket.on("disconnect", (reason) => console.log(`Socket disconnected: ${reason}`)); 71 | }); 72 | 73 | // Listen for the following event to be emitted by the socket in error cases 74 | socket.on("close", (reason) => console.log(`Socket closed: ${reason}`)); 75 | socket.on('error', (data) => console.log(`WS Error: ${data}`)); 76 | socket.on('connect_error', (data) => console.log(`Connect Error: ${data}`)); 77 | } catch (e) { 78 | console.log(`Error while initializing the Socket. Error: ${e}`); 79 | } 80 | }; 81 | 82 | initSocket(); 83 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CSGOEmpire API Documentation 2 | 3 | # Contents 4 | 5 | - [CSGOEmpire API Documentation](#csgoempire-api-documentation) 6 | - [Contents](#contents) 7 | - [Getting started](#getting-started) 8 | - [API Keys](#api-keys) 9 | - [Libraries \& Links](#libraries--links) 10 | - [Libraries](#libraries) 11 | - [Links](#links) 12 | - [Rate Limits](#rate-limits) 13 | - [Trade Status Enums](#trade-status-enums) 14 | - [Metadata](#metadata) 15 | - [Get Active Trades](#get-active-trades) 16 | - [Get Active Auctions](#get-active-auctions) 17 | - [Settings](#settings) 18 | - [Transaction History](#transaction-history) 19 | - [Blocking Users](#blocking-users) 20 | - [Blocking a User](#blocking-a-user) 21 | - [Unblocking a User](#unblocking-a-user) 22 | - [View all blocked users](#view-all-blocked-users) 23 | - [Deposits](#deposits) 24 | - [Get CSGO Inventory](#get-csgo-inventory) 25 | - [Get Unique Info](#get-unique-info) 26 | - [Create Deposit](#create-deposit) 27 | - [Cancel Deposit](#cancel-deposit) 28 | - [Cancel Multiple Deposits](#cancel-multiple-deposits) 29 | - [Sell Now](#sell-now) 30 | - [Withdraw](#withdraw) 31 | - [Get Listed Items](#get-listed-items) 32 | - [Get Depositor Stats](#get-depositor-stats) 33 | - [Create Withdrawal](#create-withdrawal) 34 | - [Place Bid](#place-bid) 35 | - [Cancel Withdrawal](#cancel-withdrawal) 36 | - [Websocket](#websocket) 37 | - [Connect To Websocket](#connect-to-websocket) 38 | - [Websocket Authentication](#websocket-authentication) 39 | - [Websocket Events](#websocket-events) 40 | - [timesync](#timesync) 41 | - [new\_item](#new_item) 42 | - [updated\_item](#updated_item) 43 | - [auction\_update](#auction_update) 44 | - [deleted\_item](#deleted_item) 45 | - [trade\_status](#trade_status) 46 | - [deposit\_failed](#deposit_failed) 47 | 48 | # Getting started 49 | 50 | All requests are included in bash form. You can use a program like [Postman](https://www.postman.com/downloads/) to import the request ([example](https://w1z0.xyz/i/fea03bc7f399b7d.mp4)) and generate ([example](https://w1z0.xyz/i/187fd8084ca40d6.mp4)) code for most major languages. 51 | 52 | Any code provided is as an example, you should write your own if you wish to do more than the most basic tasks. 53 | 54 | Any input marked '(required)' is required for the request to work, anything without that is optional. 55 | 56 | # API Keys 57 | 58 | API keys can be created, viewed and revoked here: https://csgoempire.com/trading/apikey 59 | 60 | Setting up an API key requires 2FA to be activated, 2FA codes are not required for requests authenticated via API key. 61 | 62 | # Libraries & Links 63 | 64 | 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. 65 | 66 | Please note as these are **unofficial** libraries, they may not be maintained or updated regularly, you should also verify the source code yourself. 67 | 68 | If you have something you think should be added here, please [open an issue](https://github.com/OfficialCSGOEmpire/API-Docs/issues) with a link to the library or resource and a description of what it is/does. 69 | 70 | ## Libraries 71 | 72 | - [Javascript](https://github.com/gustavo-dev/csgoempire-api) by [@gustavo-dev](https://github.com/gustavo-dev) 73 | 74 | ## Links 75 | 76 | - [Antal's Deposit Bot](https://github.com/antal-k/csgoempire-deposit) by [@antal-k](https://github.com/antal-k) - Automated deposit bot for CSGOEmpire 77 | - [Pricempire](https://pricempire.com/?r=76561198106192114) - Price comparison website for most CSGO marketplaces 78 | 79 | 80 | 81 | # Rate Limits 82 | 83 | 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. 84 | 85 | [[Back to contents](#contents)] 86 | 87 | # Trade Status Enums 88 | 89 | Below are a list of trade statuses. Trade endpoints will return status enums. 90 | 91 | - Error = -1; 92 | - Pending = 0; 93 | - Received = 1; 94 | - Processing = 2; 95 | - Sending = 3; 96 | - Confirming = 4; 97 | - Sent = 5; 98 | - Completed = 6; 99 | - Declined = 7; 100 | - Canceled = 8; 101 | - TimedOut = 9; 102 | - Credited = 10; 103 | 104 | [[Back to contents](#contents)] 105 | 106 | # Metadata 107 | 108 | URL: https://csgoempire.com/api/v2/metadata/socket 109 | 110 | Method: GET 111 | 112 | 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. 113 | 114 |
115 | Example Request: 116 | 117 | ```bash 118 | curl --location --request GET 'https://csgoempire.com/api/v2/metadata/socket' \ 119 | --header 'Authorization: Bearer {API-KEY-HERE}' 120 | 121 | ``` 122 | 123 |
124 | 125 |
126 | Example Response: 127 | 128 | ```json 129 | { 130 | "user": { 131 | "id": 303119, 132 | "steam_id": "76561198106192114", 133 | "steam_id_v3": "145926386", 134 | "steam_name": "Artemis", 135 | "avatar": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/4f/4f619bc788f0d41261d2a5ced0e96a281af88479_full.jpg", 136 | "profile_url": "https://steamcommunity.com/id/G0FastMen/", 137 | "registration_timestamp": "2016-07-27 23:20:03", 138 | "registration_ip": "0.0.0.0", 139 | "last_login": "2021-11-29 13:02:54", 140 | "balance": 0, 141 | "total_profit": 0, 142 | "total_bet": 0, 143 | "betback_total": 0, 144 | "bet_threshold": 0, 145 | "total_trades": 0, 146 | "total_deposit": 0, 147 | "total_withdraw": 0, 148 | "withdraw_limit": 0, 149 | "csgo_playtime": 0, 150 | "last_csgo_playtime_cache": "2016-07-27 23:20:03", 151 | "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=145926386&token=ABCDEF", 152 | "trade_offer_token": "ABCDEF", 153 | "ref_id": 0, 154 | "total_referral_bet": 0, 155 | "total_referral_commission": 0, 156 | "ref_permission": 0, 157 | "ref_earnings": 0, 158 | "total_ref_earnings": 0, 159 | "total_ref_count": 0, 160 | "total_credit": 0, 161 | "referral_code": "Artemis", 162 | "referral_amount": 50, 163 | "muted_until": 1632354690, 164 | "mute_reason": "Other", 165 | "admin": 0, 166 | "super_mod": 0, 167 | "mod": 0, 168 | "utm_campaign": "", 169 | "country": "", 170 | "is_vac_banned": 2, 171 | "steam_level": 343, 172 | "last_steam_level_cache": "2021-11-30 07:41:07", 173 | "whitelisted": 1, 174 | "total_tips_received": 0, 175 | "total_tips_sent": 0, 176 | "withdrawal_fee_owed": "0.0000", 177 | "flags": 0, 178 | "ban": null, 179 | "balances": [], 180 | "level": 0, 181 | "xp": 0, 182 | "socket_token": "", 183 | "user_hash": "", 184 | "hashed_server_seed": "", 185 | "intercom_hash": "", 186 | "roles": [], 187 | "eligible_for_free_case": false, 188 | "extra_security_type": "2fa", 189 | "total_bet_skincrash": 0, 190 | "total_bet_matchbetting": 0, 191 | "total_bet_roulette": 0, 192 | "total_bet_coinflip": 0, 193 | "total_bet_supershootout": 0, 194 | "p2p_telegram_notifications_allowed": true, 195 | "p2p_telegram_notifications_enabled": true, 196 | "verified": false, 197 | "hide_verified_icon": false, 198 | "unread_notifications": [], 199 | "last_session": {}, 200 | "email": "", 201 | "email_verified": false, 202 | "eth_deposit_address": "", 203 | "btc_deposit_address": "", 204 | "ltc_deposit_address": "", 205 | "bch_deposit_address": "", 206 | "steam_inventory_url": "https://steamcommunity.com/profiles/76561198106192114/inventory/#730", 207 | "steam_api_key": "", 208 | "has_crypto_deposit": true, 209 | "chat_tag": {}, 210 | "linked_accounts": [], 211 | "api_token": "nice try" 212 | }, 213 | "socket_token": "", 214 | "socket_signature": "" 215 | } 216 | 217 | ```` 218 | 219 |
220 | 221 |
222 | Ratelimit 223 | 224 | No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies. 225 |
226 | 227 | [[Back to contents](#contents)] 228 | 229 | 230 | # Get Active Trades 231 | URL: https://csgoempire.com/api/v2/trading/user/trades 232 | 233 | Method: GET 234 | 235 | 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. 236 | 237 | 238 |
239 | Example Request: 240 | 241 | 242 | ```bash 243 | curl --location --request GET 'https://csgoempire.com/api/v2/trading/user/trades' \ 244 | --header 'Authorization: Bearer {API-KEY-HERE}' 245 | 246 | ```` 247 | 248 |
249 | 250 |
251 | Example Response: 252 | 253 | ```json 254 | { 255 | "success": true, 256 | "data": { 257 | "deposits": [ 258 | { 259 | "id": 11203, 260 | "service_name": "csgoempire", 261 | "service_invoice_id": 920, 262 | "user_id": 303119, 263 | "item_id": 50755, 264 | "items": [ 265 | { 266 | "asset_id": 26876810352, 267 | "created_at": "2022-10-14 13:54:35", 268 | "custom_price_percentage": 0, 269 | "full_position": 83, 270 | "icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpovbSsLQJf3qr3czxb49KzgL-DjsjwN6vQglRd4cJ5nqeQ89mk2VHg_UpkYjj0JdLGdAFvNAvS81G6kLjq1pHtv5SdnHdhuCYq-z-DyHWIya-0", 271 | "id": 50755, 272 | "is_commodity": false, 273 | "market_name": "★ M9 Bayonet | Forest DDPAT (Factory New)", 274 | "market_value": 488.82, 275 | "name_color": "8650AC", 276 | "position": null, 277 | "preview_id": null, 278 | "price_is_unreliable": 1, 279 | "tradable": true, 280 | "tradelock": false, 281 | "updated_at": "2022-10-18 08:46:45", 282 | "wear": null 283 | } 284 | ], 285 | "total_value": 48882, 286 | "security_code": "", 287 | "tradeoffer_id": 0, 288 | "trade_id": 2, 289 | "status": 2, 290 | "status_message": "", 291 | "metadata": { 292 | "auction_highest_bid": null, 293 | "auction_highest_bidder": null, 294 | "auction_number_of_bids": 0, 295 | "auction_ends_at": 1666083002, 296 | "auction_auto_withdraw_failed": null, 297 | "price_updated_at": null, 298 | "trade_url": null, 299 | "partner": null, 300 | "total_fee": null, 301 | "fee": null, 302 | "old_total_value": null, 303 | "item_position_in_inventory": null, 304 | "item_inspected": true, 305 | "expires_at": null, 306 | "delivery_time": null, 307 | "phishingScamDetected": null, 308 | "item_validation": null, 309 | "penalty": null 310 | }, 311 | "item_hash": "7d1cacdc3016c134e284ae253543cc3b0fd63942", 312 | "created_at": "2022-10-18 08:47:02", 313 | "updated_at": "2022-10-18 08:47:02" 314 | } 315 | ], 316 | "withdrawals": [ 317 | 318 | ] 319 | } 320 | } 321 | ``` 322 | 323 |
324 | 325 |
326 | Ratelimit 327 | 3 requests per 10 seconds, block for 1 minute. 328 |
329 | 330 | [[Back to contents](#contents)] 331 | 332 | # Get Active Auctions 333 | 334 | URL: https://csgoempire.com/api/v2/trading/user/auctions 335 | 336 | Method: GET 337 | 338 | Returns an array of all auctions currently being bid on by this account. 339 | 340 |
341 | Example Request: 342 | 343 | ```bash 344 | curl --location --request GET 'https://csgoempire.com/api/v2/trading/user/auctions' \ 345 | --header 'Authorization: Bearer {API-KEY-HERE}' 346 | 347 | ``` 348 | 349 |
350 | 351 |
352 | Example Response: 353 | 354 | ```json 355 | { 356 | "success": true, 357 | "active_auctions": [ 358 | { 359 | "auction_ends_at": 1666083221, 360 | "auction_highest_bid": 227, 361 | "auction_highest_bidder": 303119, 362 | "auction_number_of_bids": 1, 363 | "custom_price_percentage": 0, 364 | "icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXX7gNTPcUmqBwTTR7SQb37g5vWCwlxdFEC5uyncgZi0vGQJWwQudm0xtTexaD2ZOmClyVB5sL8h7mCHA", 365 | "is_commodity": true, 366 | "market_name": "Name Tag", 367 | "market_value": 227, 368 | "name_color": "D2D2D2", 369 | "preview_id": null, 370 | "price_is_unreliable": true, 371 | "stickers": [ 372 | 373 | ], 374 | "wear": null, 375 | "published_at": "2022-10-18T08:51:02.803761Z", 376 | "id": 11204, 377 | "depositor_stats": { 378 | "delivery_rate_recent": 0.6, 379 | "delivery_rate_long": 0.7567567567567568, 380 | "delivery_time_minutes_recent": 7, 381 | "delivery_time_minutes_long": 7, 382 | "steam_level_min_range": 5, 383 | "steam_level_max_range": 10, 384 | "user_has_trade_notifications_enabled": false, 385 | "user_is_online": null 386 | }, 387 | "above_recommended_price": -5 388 | } 389 | ] 390 | } 391 | ``` 392 | 393 |
394 | 395 |
396 | Ratelimit 397 | 398 | No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies. 399 |
400 | 401 | [[Back to contents](#contents)] 402 | 403 | # Settings 404 | 405 | URL: https://csgoempire.com/api/v2/trading/user/settings 406 | 407 | Method: POST 408 | 409 | Used to update your tradelink and/or Steam API key 410 | 411 | Inputs: 412 | 413 | - trade_url (required): string, your steam trade url 414 | - steam_api_key : string, your steam api key 415 | 416 |
417 | Example Request: 418 | 419 | ```bash 420 | curl --location --request POST 'https://csgoempire.com/api/v2/trading/user/settings' \ 421 | --header 'Authorization: Bearer {API-KEY-HERE}' \ 422 | --header 'Content-Type: application/json' \ 423 | --data-raw '{"trade_url":"https://steamcommunity.com/tradeoffer/new/?partner=145926386&token=zYMYgbXB"}' 424 | ``` 425 | 426 |
427 | 428 |
429 | Example Response: 430 | 431 | ```json 432 | { 433 | "success": true, 434 | "escrow_seconds": 0 435 | } 436 | ``` 437 | 438 |
439 | 440 |
441 | Ratelimit 442 | 443 | No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies. 444 |
445 | 446 | [[Back to contents](#contents)] 447 | 448 | # Transaction History 449 | 450 | URL: https://csgoempire.com/api/v2/user/transactions?page={page_number} 451 | 452 | Method: GET 453 | 454 | Used to get your transaction history. 455 | 456 | Inputs: 457 | - page_number : int, the page you wish to get 458 | 459 |
460 | Example Request: 461 | 462 | ```bash 463 | curl --location --request GET 'https://csgoempire.com/api/v2/user/transactions?page=1' \ 464 | --header 'Authorization: Bearer {API-KEY-HERE}' 465 | ``` 466 | 467 |
468 | 469 |
470 | Example Response: 471 | 472 | ```json 473 | { 474 | "current_page": 1, 475 | "data": [ 476 | { 477 | "id": 54773614, 478 | "key": "withdrawal_invoices", 479 | "type": "Steam Auction Bid Withdrawal", 480 | "balance": 17543153, 481 | "delta": -227, 482 | "balance_after": 17542926, 483 | "timestamp": 1666083061.355, 484 | "timestamp_raw": 1666083061355, 485 | "date": "2022-10-18 08:51:01", 486 | "invoice_id": null, 487 | "data": { 488 | "id": 69, 489 | "processor_name": "Steam", 490 | "status": 200, 491 | "status_name": "Created", 492 | "metadata": { 493 | "deposit_id": 11204, 494 | "payment_method": "auction_bid", 495 | "id": 11204, 496 | "auction_highest_bid": 227, 497 | "auction_highest_bidder": 303119, 498 | "auction_number_of_bids": 1, 499 | "auction_ends_at": 1666083221 500 | } 501 | } 502 | } 503 | ], 504 | "first_page_url": "user/transactions?page=1", 505 | "from": 1, 506 | "last_page": 2499, 507 | "last_page_url": "user/transactions?page=2499", 508 | "links": [ 509 | { 510 | "url": null, 511 | "label": "« Previous", 512 | "active": false 513 | }, 514 | { 515 | "url": "user/transactions?page=1", 516 | "label": "1", 517 | "active": true 518 | }, 519 | { 520 | "url": "user/transactions?page=2", 521 | "label": "2", 522 | "active": false 523 | }, 524 | { 525 | "url": "user/transactions?page=3", 526 | "label": "3", 527 | "active": false 528 | }, 529 | { 530 | "url": "user/transactions?page=4", 531 | "label": "4", 532 | "active": false 533 | }, 534 | { 535 | "url": "user/transactions?page=5", 536 | "label": "5", 537 | "active": false 538 | }, 539 | { 540 | "url": "user/transactions?page=6", 541 | "label": "6", 542 | "active": false 543 | }, 544 | { 545 | "url": "user/transactions?page=7", 546 | "label": "7", 547 | "active": false 548 | }, 549 | { 550 | "url": "user/transactions?page=8", 551 | "label": "8", 552 | "active": false 553 | }, 554 | { 555 | "url": "user/transactions?page=9", 556 | "label": "9", 557 | "active": false 558 | }, 559 | { 560 | "url": "user/transactions?page=10", 561 | "label": "10", 562 | "active": false 563 | }, 564 | { 565 | "url": null, 566 | "label": "...", 567 | "active": false 568 | }, 569 | { 570 | "url": "user/transactions?page=2498", 571 | "label": "2498", 572 | "active": false 573 | }, 574 | { 575 | "url": "user/transactions?page=2499", 576 | "label": "2499", 577 | "active": false 578 | }, 579 | { 580 | "url": "user/transactions?page=2", 581 | "label": "Next »", 582 | "active": false 583 | } 584 | ], 585 | "next_page_url": "user/transactions?page=2", 586 | "path": "user/transactions", 587 | "per_page": 1, 588 | "prev_page_url": null, 589 | "to": 1, 590 | "total": 2499 591 | } 592 | ``` 593 | 594 |
595 | 596 |
597 | Ratelimit 598 | 599 | No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies. 600 |
601 | 602 | [[Back to contents](#contents)] 603 | 604 | # Blocking Users 605 | 606 | ## Blocking a User 607 | 608 | URL: https://csgoempire.com/api/v2/trading/block-list/{steam_id} 609 | 610 | Method: POST 611 | 612 | Used to block a user, preventing them from trading with you, and you with them. 613 | 614 | Inputs: 615 | - steam_id : string, the users steam ID 616 | 617 |
618 | Example Request: 619 | 620 | ```bash 621 | curl --location --request POST 'https://csgoempire.com/api/v2/trading/block-list/76561197960287930' \ 622 | --header 'Authorization: Bearer {API-KEY-HERE}' 623 | ``` 624 | 625 |
626 | 627 |
628 | Example Response: 629 | 630 | ```json 631 | { 632 | "success": true, 633 | } 634 | ``` 635 | 636 |
637 | 638 |
639 | Ratelimit 640 | 641 | No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies. 642 |
643 | 644 | [[Back to contents](#contents)] 645 | 646 | ## Unblocking a User 647 | 648 | URL: https://csgoempire.com/api/v2/trading/block-list/{steam_id} 649 | 650 | Method: DELETE 651 | 652 | Used to unblock a user, allowing them to trade with you, and you with them. 653 | 654 | Inputs: 655 | - steam_id : string, the users steam ID 656 | 657 |
658 | Example Request: 659 | 660 | ```bash 661 | curl --location --request DELETE 'https://csgoempire.com/api/v2/trading/block-list/76561197960287930' \ 662 | --header 'Authorization: Bearer {API-KEY-HERE}' 663 | ``` 664 | 665 |
666 | 667 |
668 | Example Response: 669 | 670 | ```json 671 | { 672 | "success": true, 673 | } 674 | ``` 675 | 676 |
677 | 678 |
679 | Ratelimit 680 | 681 | No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies. 682 |
683 | 684 | [[Back to contents](#contents)] 685 | 686 | ## View all blocked users 687 | 688 | URL: https://csgoempire.com/api/v2/trading/block-list 689 | 690 | Method: GET 691 | 692 | Used to get a list of all currently blocked users. 693 | 694 |
695 | Example Request: 696 | 697 | ```bash 698 | curl --location --request GET 'https://csgoempire.com/api/v2/trading/block-list' \ 699 | --header 'Authorization: Bearer {API-KEY-HERE}' 700 | ``` 701 | 702 |
703 | 704 |
705 | Example Response: 706 | 707 | ```json 708 | [ 709 | { 710 | "id": 1, 711 | "blocker_user_id": 76561198106192114, 712 | "blocked_user_id": 76561197960287930, 713 | "created_at": "2022-02-15 11:57:08", 714 | "updated_at": "2022-02-15 11:57:08" 715 | } 716 | ] 717 | ``` 718 | 719 |
720 | 721 |
722 | Ratelimit 723 | 724 | No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies. 725 |
726 | 727 | [[Back to contents](#contents)] 728 | 729 | # Deposits 730 | 731 | ## Get CSGO Inventory 732 | 733 | URL: https://csgoempire.com/api/v2/trading/user/inventory 734 | 735 | Method: GET 736 | 737 | Fetch your inventory from steam and caches it to the database for 1 hour. 738 | 739 | Inputs: 740 | 741 | - invalid : yes|no - Filters invalid items, defaults to no filtering 742 | 743 |
744 | Example Request: 745 | 746 | ```bash 747 | curl --location --request GET 'https://csgoempire.com/api/v2/trading/user/inventory' \ 748 | --header 'Authorization: Bearer {API-KEY-HERE}' 749 | ``` 750 | 751 |
752 | 753 |
754 | Example Response: 755 | 756 | ```json 757 | { 758 | "success": true, 759 | "updatedAt": 1666082810, 760 | "allowUpdate": true, 761 | "data": [ 762 | { 763 | "asset_id": 26876810352, 764 | "created_at": "2022-10-14 13:54:35", 765 | "custom_price_percentage": null, 766 | "full_position": 83, 767 | "icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpovbSsLQJf3qr3czxb49KzgL-DjsjwN6vQglRd4cJ5nqeQ89mk2VHg_UpkYjj0JdLGdAFvNAvS81G6kLjq1pHtv5SdnHdhuCYq-z-DyHWIya-0", 768 | "id": 50755, 769 | "invalid": "This item is currently in an active deposit.", 770 | "is_commodity": false, 771 | "market_name": "★ M9 Bayonet | Forest DDPAT (Factory New)", 772 | "market_value": 48882, 773 | "name_color": "8650AC", 774 | "position": null, 775 | "preview_id": "43246cdca7fe", 776 | "price_is_unreliable": 1, 777 | "stickers": [], 778 | "tradable": true, 779 | "tradelock": false, 780 | "updated_at": "2022-10-18 08:46:45", 781 | "wear": 0.064 782 | }, 783 | { 784 | "asset_id": 27299195480, 785 | "created_at": "2022-10-14 13:54:34", 786 | "custom_price_percentage": null, 787 | "full_position": 27, 788 | "icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou7uifDhnwMzFcDoV09ajh5SClPLLP7LWnn8f7sZ1ib6S9I6i3w21qUNlYDymI9KcclI3YAvRr1Ltwujm18TvtMnPzGwj5Hdb1VS4mQ", 789 | "id": 50696, 790 | "is_commodity": false, 791 | "market_name": "StatTrak™ MAG-7 | Justice (Factory New)", 792 | "market_value": 3267, 793 | "name_color": "CF6A32", 794 | "position": 2, 795 | "preview_id": null, 796 | "price_is_unreliable": 0, 797 | "stickers": [ 798 | { 799 | "sticker_id": 3453, 800 | "wear": null, 801 | "name": "Legendary Eagle Master (Holo)", 802 | "image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulROR0XcS-O_2NrDbF51NRdCur_qJwJt7PvHfTJ94N2kk4XFw_OhZbmAxWhT7Zcp3u2TpIqmilDl8hZsMjylJoHEIAA9ZQ2B-1W-xfCv28G5r0_B7Q" 803 | } 804 | ], 805 | "tradable": true, 806 | "tradelock": false, 807 | "updated_at": "2022-10-18 08:46:45", 808 | "wear": 0.068 809 | } 810 | ] 811 | } 812 | ``` 813 | 814 |
815 | 816 |
817 | Ratelimit 818 | 819 | No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies. 820 |
821 | 822 | [[Back to contents](#contents)] 823 | 824 | ## Get Unique Info 825 | 826 | URL: https://csgoempire.com/api/v2/trading/user/inventory/unique-info 827 | 828 | Method: GET 829 | 830 | Get inspected unique info for items in user inventory. Examples include float/sticker data 831 | 832 |
833 | Example Request: 834 | 835 | ```bash 836 | curl --location --request GET 'https://csgoempire.com/api/v2/trading/user/inventory/unique-info' \ 837 | --header 'Authorization: Bearer {API-KEY-HERE}' 838 | ``` 839 | 840 |
841 | 842 | 843 |
844 | Example Response: 845 | 846 | ```json 847 | { 848 | "success": true, 849 | "data": [ 850 | { 851 | "id": 50696, 852 | "asset_id": 27299195480, 853 | "wear": 0.068, 854 | "stickers": [ 855 | { 856 | "slot": 0, 857 | "sticker_id": 3453, 858 | "wear": null, 859 | "scale": null, 860 | "rotation": null, 861 | "tint_id": null, 862 | "name": "Legendary Eagle Master (Holo)", 863 | "image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulROR0XcS-O_2NrDbF51NRdCur_qJwJt7PvHfTJ94N2kk4XFw_OhZbmAxWhT7Zcp3u2TpIqmilDl8hZsMjylJoHEIAA9ZQ2B-1W-xfCv28G5r0_B7Q" 864 | } 865 | ] 866 | }, 867 | { 868 | "id": 50697, 869 | "asset_id": 27297587028, 870 | "wear": 0.392, 871 | "stickers": [ 872 | 873 | ] 874 | } 875 | } 876 | ``` 877 | 878 |
879 | 880 |
881 | Ratelimit 882 | 883 | No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies. 884 |
885 | 886 | [[Back to contents](#contents)] 887 | 888 | ## Create Deposit 889 | 890 | URL: https://csgoempire.com/api/v2/trading/deposit 891 | 892 | Method: POST 893 | 894 | List an item(s) for sale. 895 | 896 | Inputs: 897 | 898 | - Items: (required) array with array elements: [id: itemId, coin_value: int] (Max 20 per request) 899 | 900 | Notes: 901 | * coin_value is in coin cents, so 100.01 coins is represented as 10001 902 | * 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. 903 | * the frontend works differently, use how these docs suggest, the requests are smaller and therefore faster than the frontend. 904 | * 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. 905 | * 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. 906 | 907 | Pricing example: 908 | ```python 909 | percent = 5 910 | market_price = 10001 911 | price = round(market_price * (percent/100+1)) 912 | item = { 913 | "id": 3731677705, 914 | "coin_value": price 915 | } 916 | ``` 917 | 918 | 919 |
920 | Example Input: 921 | 922 | ```json 923 | { 924 | "items": [ 925 | { 926 | "id": 3731677704, 927 | "coin_value": 576811 928 | }, 929 | { 930 | "id": 3731677705, 931 | "coin_value": 52811 932 | } 933 | ] 934 | } 935 | ``` 936 | 937 |
938 | 939 |
940 | Example Request:y> 941 | 942 | ```bash 943 | curl --location --request POST 'https://csgoempire.com/api/v2/trading/deposit' \ 944 | --header 'Authorization: Bearer {API-KEY-HERE}' \ 945 | --header 'Content-Type: application/json' \ 946 | --data-raw '{"items":[{"id":50755,"coin_value":48882}]}' 947 | ``` 948 | 949 |
950 | 951 |
952 | Example Response: 953 | 954 | ```json 955 | { 956 | "success": true 957 | } 958 | ``` 959 | 960 |
961 | 962 |
963 | Ratelimit 964 | 965 | 20 requests per 10 seconds, block for 1 minute. 966 |
967 | 968 | [[Back to contents](#contents)] 969 | 970 | ## Cancel Deposit 971 | 972 | URL: https://csgoempire.com/api/v2/trading/deposit/{DEPOSIT-ID}/cancel 973 | 974 | Method: POST 975 | 976 | Cancels processing deposit without any bids. Once a bid has been placed items are no longer eligible to be cancelled. 977 | 978 |
979 | Example Request: 980 | 981 | ```bash 982 | curl --location --request POST 'https://csgoempire.com/api/v2/trading/deposit/28391470/cancel' \ 983 | --header 'Authorization: Bearer {API-KEY-HERE}' 984 | ``` 985 | 986 |
987 | 988 |
989 | Example Response: 990 | 991 | ```json 992 | { 993 | "success": true 994 | } 995 | ``` 996 | 997 |
998 | 999 |
1000 | Ratelimit 1001 | 1002 | Success: Global ratelimit 1003 | Error: 20 requests per 10 seconds, block for 1 minute. 1004 |
1005 | 1006 | [[Back to contents](#contents)] 1007 | 1008 | ## Cancel Multiple Deposits 1009 | 1010 | URL: https://csgoempire.com/api/v2/trading/deposit/cancel 1011 | 1012 | Method: POST 1013 | 1014 | Cancels processing multiple deposit without any bids. Once a bid has been placed items are no longer eligible to be cancelled. 1015 | 1016 | Inputs: 1017 | 1018 | - Array of deposits ids (required) : integer 1019 |
1020 | Example Request: 1021 | 1022 | ```bash 1023 | curl --location --request POST 'https://csgoempire.com/api/v2/trading/deposit/cancel' \ 1024 | --header 'Authorization: Bearer {API-KEY-HERE}' \ 1025 | --data-raw '{"ids":[10001, 10002, 10003, 10004, 10005]}' 1026 | ``` 1027 | 1028 |
1029 | 1030 |
1031 | Example Response: 1032 | 1033 | ```json 1034 | { 1035 | "success": true, 1036 | "data": { 1037 | "10001": {"success":false,"message":"You don't have a cancellable deposit."}, 1038 | "10002": {"success":true}, 1039 | "10003": {"success":true}, 1040 | "10004": {"success":true}, 1041 | "10005": {"success":false,"message":"You don't have a cancellable deposit."} 1042 | } 1043 | } 1044 | 1045 | ``` 1046 | 1047 |
1048 | 1049 |
1050 | Ratelimit 1051 | 1052 | Success: Global ratelimit 1053 | Error: 20 requests per 10 seconds, block for 1 minute. 1054 |
1055 | 1056 | [[Back to contents](#contents)] 1057 | 1058 | ## Sell Now 1059 | 1060 | URL: https://csgoempire.com/api/v2//trading/deposit/{deposit_id}/sell 1061 | 1062 | Method: POST 1063 | 1064 | Sell an item immediately. 1065 | 1066 | Inputs: 1067 | 1068 | - deposit_id (required) : integer - Required in the URL 1069 | 1070 |
1071 | Example Request: 1072 | 1073 | ```bash 1074 | curl --location --request POST 'https://csgoempire.com/api/v2/trading/deposit/28393316/sell' \ 1075 | --header 'Authorization: Bearer {API-KEY-HERE}' 1076 | ``` 1077 | 1078 |
1079 | 1080 |
1081 | Example Response: 1082 | 1083 | ```json 1084 | { 1085 | "success": true, 1086 | "auction_data": { 1087 | "id": 28393316, 1088 | "app_id": 730, 1089 | "auction_highest_bid": 54, 1090 | "auction_highest_bidder": 2700170, 1091 | "auction_number_of_bids": 2, 1092 | "auction_ends_at": 1638273900 1093 | } 1094 | } 1095 | ``` 1096 | 1097 |
1098 | 1099 |
1100 | Ratelimit 1101 | 1102 | No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies. 1103 |
1104 | 1105 | [[Back to contents](#contents)] 1106 | 1107 | # Withdraw 1108 | 1109 | ## Get Listed Items 1110 | 1111 | URL: https://csgoempire.com/api/v2/trading/items 1112 | 1113 | Method: GET 1114 | 1115 | Get a list of all items listed on the withdrawals page 1116 | 1117 | Inputs: 1118 | 1119 | - per_page - (required), number. How many items to fetch. Min is 1 and max is 200 for guests and 2500 for logged in user 1120 | - page - (required), number. Page to fetch. 1121 | - search - string. Item market name to search. 2 char min length. 1122 | - order - string. Field to use for ordering supported fields: market_value 1123 | - sort - string. Sorting asc or desc. Default asc 1124 | - auction - string. Auction only, yes/no, defaults to no. 1125 | - price_min - number. Minimum item current price. 1126 | - price_max - number. Maximum item current price. 1127 | - price_max_above - number. Maximum item percentage to show. 1128 | - wear_min - number (0-1). Minimum float wear value. 1129 | - wear_max - number (0-1). Maximum float wear value. 1130 | - delivery_time_long_min - number. Minimum delivery time average from the last 100 items. 1131 | - delivery_time_long_max - number. Maximum delivery time average from the last 100 items. 1132 | - has_stickers - yes/no. Filters for items that have stickers. 1133 | - is_commodity - yes/no. Filters for items that are commodities. Cannot have wear/sticker based filters. 1134 | 1135 |
1136 | Example Request: 1137 | 1138 | ```bash 1139 | 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' \ 1140 | --header 'Authorization: Bearer {API-KEY-HERE}' 1141 | ``` 1142 | 1143 |
1144 | 1145 |
1146 | Example Response: 1147 | 1148 | ```json 1149 | { 1150 | "current_page": 1, 1151 | "data": [ 1152 | { 1153 | "auction_ends_at": 1665762091, 1154 | "auction_highest_bid": null, 1155 | "auction_highest_bidder": null, 1156 | "auction_number_of_bids": 0, 1157 | "custom_price_percentage": 0, 1158 | "icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou-6kejhnwMzFJQJE4NOhkZKYqPrxN7LEmyVQ7JMkieiTp92sjAzs_hc4Nm_7LdCcdQdrNVrU_gK6xOnt0MO4tZvP1zI97XHPMlL3", 1159 | "is_commodity": false, 1160 | "market_name": "StatTrak™ M4A4 | Spider Lily (Well-Worn)", 1161 | "market_value": 240, 1162 | "name_color": "CF6A32", 1163 | "preview_id": "3d33db497b7b", 1164 | "price_is_unreliable": false, 1165 | "stickers": [], 1166 | "wear": 0.431, 1167 | "published_at": "2022-10-14T15:38:33.947439Z", 1168 | "id": 11196, 1169 | "depositor_stats": { 1170 | "delivery_rate_recent": 1, 1171 | "delivery_rate_long": 0.9565217391304348, 1172 | "delivery_time_minutes_recent": 2, 1173 | "delivery_time_minutes_long": 3, 1174 | "steam_level_min_range": 5, 1175 | "steam_level_max_range": 10, 1176 | "user_has_trade_notifications_enabled": false, 1177 | "user_is_online": null 1178 | }, 1179 | "above_recommended_price": -6 1180 | } 1181 | ], 1182 | "first_page_url": "http://csgoempire.com/api/trading/items?per_page=10&price_max_above=15&sort=desc&order=market_value&page=1", 1183 | "from": 1, 1184 | "last_page": 1, 1185 | "last_page_url": "http://csgoempire.com/api/trading/items?per_page=10&price_max_above=15&sort=desc&order=market_value&page=1", 1186 | "links": [ 1187 | { 1188 | "url": null, 1189 | "label": "« Previous", 1190 | "active": false 1191 | }, 1192 | { 1193 | "url": "http://csgoempire.com/api/trading/items?per_page=10&price_max_above=15&sort=desc&order=market_value&page=1", 1194 | "label": "1", 1195 | "active": true 1196 | }, 1197 | { 1198 | "url": null, 1199 | "label": "Next »", 1200 | "active": false 1201 | } 1202 | ], 1203 | "next_page_url": null, 1204 | "path": "http://csgoempire.com/api/trading/items", 1205 | "per_page": "10", 1206 | "prev_page_url": null, 1207 | "to": 1, 1208 | "total": 1 1209 | } 1210 | ``` 1211 | 1212 |
1213 | 1214 |
1215 | Ratelimit 1216 | 1217 | 20 requests per 10 seconds if not searching, 3 requests per 10 seconds if searching 1218 | 1219 |
1220 | 1221 | [[Back to contents](#contents)] 1222 | 1223 | ## Get Depositor Stats 1224 | 1225 | URL: https://csgoempire.com/api/v2/trading/deposit/{DEPOSIT_ID}/stats 1226 | 1227 | Method: GET 1228 | 1229 | Get the depositing users stats from a unique deposit ID 1230 | 1231 | Inputs: 1232 | 1233 | - deposit_id (required) : integer - Required in the URL 1234 | 1235 |
1236 | Example Request: 1237 | 1238 | ```bash 1239 | curl --location --request GET 'https://csgoempire.com/api/v2/trading/deposit/28079776/stats' \ 1240 | --header 'Authorization: Bearer {API-KEY-HERE}' 1241 | ``` 1242 | 1243 |
1244 | 1245 |
1246 | Example Response: 1247 | 1248 | ```json 1249 | { 1250 | "delivery_rate_recent": 1, 1251 | "delivery_rate_long": 1, 1252 | "delivery_time_minutes_recent": null, 1253 | "delivery_time_minutes_long": null, 1254 | "steam_level_min_range": 100, 1255 | "steam_level_max_range": 5000, 1256 | "user_has_trade_notifications_enabled": false, 1257 | "user_is_online": null 1258 | } 1259 | ``` 1260 | 1261 |
1262 | 1263 |
1264 | Ratelimit 1265 | 1266 | No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies. 1267 |
1268 | 1269 | [[Back to contents](#contents)] 1270 | 1271 | ## Create Withdrawal 1272 | 1273 | URL: https://csgoempire.com/api/v2/trading/deposit/{DEPOSIT_ID}/withdraw 1274 | 1275 | Method: POST 1276 | 1277 | Withdraw item directly if the auction has expired without being won. 1278 | 1279 | Inputs: 1280 | 1281 | - deposit_id (required) : integer - Required in the URL 1282 | - coin_value (required) : integer - The item price. 1283 | 1284 |
1285 | Example Request: 1286 | 1287 | ```bash 1288 | curl --location --request POST 'https://csgoempire.com/api/v2/trading/deposit/28396506/withdraw' \ 1289 | --header 'Authorization: Bearer {API-KEY-HERE}' \ 1290 | --header 'Content-Type: application/json' \ 1291 | --data-raw '{"coin_value":64}' 1292 | ``` 1293 | 1294 |
1295 | 1296 |
1297 | Example Response: 1298 | 1299 | ```json 1300 | { 1301 | "success": true, 1302 | "data": { 1303 | "id": 13745535, 1304 | "user_id": 303119, 1305 | "item_id": null, 1306 | "items": [ 1307 | { 1308 | "app_id": 730, 1309 | "created_at": 1638267229, 1310 | "custom_price_percentage": null, 1311 | "icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulROWEPTTOz_h52CHFp7ITtRubOpZVZh1vGbJW0Xuoq3zdiKxfKsNunVxj1TsMEk3LmS9930jQPnqEI6NW3tZNjC2hpzSfU", 1312 | "id": 28387732, 1313 | "img": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulROWEPTTOz_h52CHFp7ITtRubOpZVZh1vGbJW0Xuoq3zdiKxfKsNunVxj1TsMEk3LmS9930jQPnqEI6NW3tZNjC2hpzSfU", 1314 | "is_commodity": true, 1315 | "market_name": "Sticker | GODSENT (Foil) | Stockholm 2021", 1316 | "market_value": 0.41, 1317 | "name": "Sticker | GODSENT (Foil) | Stockholm 2021", 1318 | "name_color": "D2D2D2", 1319 | "paint_index": null, 1320 | "preview_id": null, 1321 | "price_is_unreliable": false, 1322 | "tradable": true, 1323 | "tradelock": false, 1324 | "type": "Exotic Sticker", 1325 | "updated_at": "2021-11-30 13:41:36", 1326 | "wear": null 1327 | } 1328 | ], 1329 | "total_value": 41, 1330 | "security_code": "", 1331 | "tradeoffer_id": 28387732, 1332 | "trade_id": 2, 1333 | "status": 4, 1334 | "status_message": "Confirming", 1335 | "metadata": { 1336 | "auction_highest_bid": null, 1337 | "auction_highest_bidder": null, 1338 | "auction_number_of_bids": 0, 1339 | "auction_ends_at": 1638267409, 1340 | "auction_auto_withdraw_failed": null, 1341 | "price_updated_at": null, 1342 | "trade_url": null, 1343 | "partner": null, 1344 | "total_fee": null, 1345 | "fee": null, 1346 | "old_total_value": null, 1347 | "item_position_in_inventory": 2, 1348 | "item_inspected": false, 1349 | "steam_id": "76561198106192114", 1350 | "expires_at": null, 1351 | "delivery_time": null, 1352 | "phishingScamDetected": null, 1353 | "item_validation": null, 1354 | "possible_abuse_detected_at": null, 1355 | "penalty": null, 1356 | "service_name": "csgoempire", 1357 | "service_invoice_id": 3881481 1358 | }, 1359 | "created_at": "2021-11-30 13:46:29", 1360 | "updated_at": "2021-11-30 13:46:29" 1361 | }, 1362 | "invoice": { 1363 | "user_id": 303119, 1364 | "status": 201, 1365 | "processor_id": 1, 1366 | "currency_id": 1, 1367 | "amount_coins": 41, 1368 | "metadata": { 1369 | "deposit_id": 28387732 1370 | }, 1371 | "ip": "0.0.0.0", 1372 | "updated_at": "2021-11-30 13:46:29", 1373 | "created_at": "2021-11-30 13:46:27", 1374 | "id": 5191251, 1375 | "processor_txid": "13745535", 1376 | "user": { 1377 | "id": 303119, 1378 | "steam_id": "76561198106192114", 1379 | "steam_id_v3": "145926386", 1380 | "steam_name": "Artemis", 1381 | "avatar": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/4f/4f619bc788f0d41261d2a5ced0e96a281af88479_full.jpg", 1382 | "profile_url": "https://steamcommunity.com/id/G0FastMen/", 1383 | "registration_timestamp": "2016-07-27 23:20:03", 1384 | "registration_ip": "0.0.0.0", 1385 | "last_login": "2021-11-29 13:02:54", 1386 | "balance": 0, 1387 | "total_profit": 0, 1388 | "total_bet": 0, 1389 | "betback_total": 0, 1390 | "bet_threshold": 0, 1391 | "total_trades": 0, 1392 | "total_deposit": 0, 1393 | "total_withdraw": 0, 1394 | "withdraw_limit": 0, 1395 | "csgo_playtime": 0, 1396 | "last_csgo_playtime_cache": "2016-07-27 23:20:03", 1397 | "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=145926386&token=ABCDEF", 1398 | "trade_offer_token": "ABCDEF", 1399 | "ref_id": 0, 1400 | "total_referral_bet": 1, 1401 | "total_referral_commission": 1, 1402 | "ref_permission": 1, 1403 | "ref_earnings": 0, 1404 | "total_ref_earnings": 1, 1405 | "total_ref_count": 0, 1406 | "total_credit": 1, 1407 | "referral_code": null, 1408 | "referral_amount": 50, 1409 | "muted_until": 1632354690, 1410 | "mute_reason": "Other", 1411 | "admin": 0, 1412 | "super_mod": 0, 1413 | "mod": 0, 1414 | "utm_campaign": "", 1415 | "country": "", 1416 | "is_vac_banned": 2, 1417 | "steam_level": 343, 1418 | "last_steam_level_cache": "2021-11-30T13:46:29.814674Z", 1419 | "whitelisted": 1, 1420 | "total_tips_received": 0, 1421 | "total_tips_sent": 0, 1422 | "withdrawal_fee_owed": "0.0000", 1423 | "flags": 704, 1424 | "encrypted_fields": [], 1425 | "balances": [], 1426 | "kyc": [], 1427 | "steam_data": { 1428 | "user_id": 303119, 1429 | "timecreated": 1378522915 1430 | } 1431 | }, 1432 | "status_name": "Processing", 1433 | "processor_name": "Steam P2P" 1434 | } 1435 | } 1436 | ``` 1437 | 1438 |
1439 | 1440 |
1441 | Ratelimit 1442 | 1443 | Success: 8 requests per 10 seconds, block for 1 minute 1444 | Failure: 2 per 10 seconds, block for 1 minute 1445 | 1446 |
1447 | 1448 | [[Back to contents](#contents)] 1449 | 1450 | ## Place Bid 1451 | 1452 | URL: https://csgoempire.com/api/v2/trading/deposit/{DEPOSIT_ID}/bid 1453 | 1454 | Method: POST 1455 | 1456 | Place a bid on an auction. 1457 | 1458 | Inputs: 1459 | 1460 | - bid_value (required) : integer, the amount of coins to bid. 1461 | 1462 |
1463 | Example Request: 1464 | 1465 | ```bash 1466 | curl --location --request POST 'https://csgoempire.com/api/v2/trading/deposit/28396506/bid' \ 1467 | --header 'Authorization: Bearer {API-KEY-HERE}' \ 1468 | --header 'Content-Type: application/json' \ 1469 | --data-raw '{"bid_value":64}' 1470 | ``` 1471 | 1472 |
1473 | 1474 |
1475 | Example Response: 1476 | 1477 | ```json 1478 | { 1479 | "success": true, 1480 | "auction_data": { 1481 | "id": 28396506, 1482 | "app_id": 730, 1483 | "auction_highest_bid": 64, 1484 | "auction_highest_bidder": 303119, 1485 | "auction_number_of_bids": 11, 1486 | "auction_ends_at": 1638279554 1487 | }, 1488 | "invoice": { 1489 | "user_id": 303119, 1490 | "status": 200, 1491 | "processor_id": 1, 1492 | "currency_id": 1, 1493 | "amount_coins": 64, 1494 | "metadata": { 1495 | "deposit_id": 28396506 1496 | }, 1497 | "ip": "0.0.0.0", 1498 | "updated_at": 1638279494, 1499 | "created_at": 1638279490, 1500 | "id": 5190329, 1501 | "processor_ref": "15064711", 1502 | "status_name": "CREATED", 1503 | "processor_name": "Steam P2P", 1504 | "currency_code": "CSGOEMPIRE_COIN", 1505 | "complete_at": null, 1506 | "refunded_at": null 1507 | } 1508 | } 1509 | ``` 1510 | 1511 |
1512 | 1513 |
1514 | Ratelimit 1515 | 1516 | Success: 20 requests per 10 seconds, block for 1 minute 1517 | Failure: 20 per 10 seconds, block for 1 minute 1518 | 1519 |
1520 | 1521 | [[Back to contents](#contents)] 1522 | 1523 | 1524 | ## Cancel Withdrawal 1525 | 1526 | URL: https://csgoempire.com/api/trading/user/withdrawals/{WITHDRAWAL_ID} 1527 | 1528 | Method: DELETE 1529 | 1530 | Cancel a withdrawal if unsent and past the 30 minute mark. 1531 | 1532 |
1533 | Example Request: 1534 | 1535 | ```bash 1536 | curl --location --request DELETE 'https://csgoempire.com/api/trading/user/withdrawals/12345' \ 1537 | --header 'Authorization: Bearer {API-KEY-HERE}' \ 1538 | --header 'Content-Type: application/json' 1539 | ``` 1540 | 1541 |
1542 | 1543 |
1544 | Example Response: 1545 | 1546 | ```json 1547 | { 1548 | "success": true 1549 | } 1550 | ``` 1551 | 1552 |
1553 | 1554 |
1555 | Ratelimit 1556 | 1557 | No specific ratelimit, global ratelimit of 120 requests per 10 seconds applies. 1558 | 1559 |
1560 | 1561 | [[Back to contents](#contents)] 1562 | 1563 | # Websocket 1564 | 1565 | ## Connect To Websocket 1566 | 1567 | URL: wss://trade.csgoempire.com/s/?EIO=3&transport=websocket 1568 | 1569 | Example code for connecting to the websocket can be found [here](https://github.com/OfficialCSGOEmpire/API-Docs/blob/main/examples/websocket/websocket-connection.js) 1570 | 1571 | Note: 1572 | Connecting to the socket requires Socket.IO v2.x Client 1573 | 1574 | [[Back to contents](#contents)] 1575 | 1576 | ## Websocket Authentication 1577 | 1578 | 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: 1579 | 1580 |
1581 | Example Frame: 1582 | 1583 | ```json 1584 | { 1585 | "uid": , 1586 | "model": { ...user_model }, 1587 | "authorizationToken": , 1588 | "signature": , 1589 | "uuid": 1590 | } 1591 | ``` 1592 | 1593 |
1594 | 1595 | See [metadata](#metadata) on how to get the required socket auth data. 1596 | 1597 | This returns the following: 1598 | 1599 |
1600 | Example Response: 1601 | 1602 | ```json 1603 | [ 1604 | "init", 1605 | { 1606 | "authenticated":true, 1607 | "serverTime":"2021-11-30T08:30:09.443Z", 1608 | "server":"trade:slave-server:GpOfWK", 1609 | "id":303119, 1610 | "steam_name":"Artemis", 1611 | "steam_id":"76561198106192114", 1612 | "verified":false, 1613 | "hide_verified_icon":false, 1614 | "avatar":"https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/4f/4f619bc788f0d41261d2a5ced0e96a281af88479_full.jpg", 1615 | "profile_url":"https://steamcommunity.com/id/G0FastMen/", 1616 | "balance":1533471521, 1617 | "bet_threshold":0, 1618 | "total_bet":2147483647, 1619 | "total_deposit":2182538, 1620 | "withdraw_limit":234118685, 1621 | "ref_id":0, 1622 | "referral_code":"Artemis", 1623 | "muted_until":0, 1624 | "mute_reason":"", 1625 | "utm_campaign":"", 1626 | "is_vac_banned":2, 1627 | "whitelisted":false, 1628 | "registration_ip":"0.0.0.0", 1629 | "steam_level":343, 1630 | "registration_timestamp":"2016-07-27 23:20:03", 1631 | "total_profit":-689280648, 1632 | "roles":[ 1633 | "super-mod", 1634 | "tester", 1635 | "support-manager", 1636 | "root", 1637 | "matchbetting-beta", 1638 | "shark", 1639 | "admin", 1640 | "manager", 1641 | "mod" 1642 | ], 1643 | "chat_tag":null, 1644 | "uid":303119, 1645 | "helper_mod":false, 1646 | "mod":true, 1647 | "super_mod":true, 1648 | "admin":true, 1649 | "qa":false, 1650 | "deposited":true, 1651 | "lvl":119, 1652 | "badge_text":null, 1653 | "badge_text_localized":null, 1654 | "badge_color":null, 1655 | "hide_rank":null, 1656 | "name":"Artemis" 1657 | } 1658 | ] 1659 | ``` 1660 | 1661 |
1662 | 1663 | 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.** 1664 | 1665 | To do this, emit the following: 1666 | 1667 | 1668 |
1669 | Filters: 1670 | 1671 | ```json 1672 | { 1673 | "price_max": 9999999 1674 | } 1675 | ``` 1676 |
1677 | 1678 | 1679 | In most languages, this will look something like `emit('filters', {'price_max': 9999999});`. 1680 | 1681 | 1682 | [[Back to contents](#contents)] 1683 | 1684 | ## Websocket Events 1685 | 1686 | All websocket events can be either a single item OR an array containing multiple items. 1687 | 1688 | ## timesync 1689 | 1690 | Syncing server timestamp. It is not emitted unless the client asks it by sending timesync event. 1691 | 1692 |
1693 | Event sample: 1694 | 1695 | ```json 1696 | ["timesync",1619682261540] 1697 | ``` 1698 | 1699 |
1700 | 1701 | [[Back to contents](#contents)] 1702 | 1703 | ## new_item 1704 | 1705 | Emitted when a new item is available. 1706 | 1707 |
1708 | Event sample: 1709 | 1710 | ```json 1711 | [ 1712 | "new_item", 1713 | [ 1714 | { 1715 | "auction_ends_at": 1682284226, 1716 | "auction_highest_bid": null, 1717 | "auction_highest_bidder": null, 1718 | "auction_number_of_bids": 0, 1719 | "custom_price_percentage": 197, 1720 | "icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgposr-kLAtl7PLFTj9Q49Kskb-Yh_bmOLfUqWdY781lxL2T8Y-kjAa2qhZlNmz7ItCSd1I4ZVrVrFi6kO_mgJa9uJXAyHdguXI8pSGKoKTrgPA", 1721 | "is_commodity": false, 1722 | "market_name": "Desert Eagle | Bronze Deco (Factory New)", 1723 | "market_value": 353, 1724 | "name_color": "D2D2D2", 1725 | "preview_id": null, 1726 | "price_is_unreliable": false, 1727 | "stickers": [ 1728 | { 1729 | "sticker_id": 377, 1730 | "wear": null, 1731 | "name": "Kawaii Killer Terrorist", 1732 | "image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulReQ0HdUuqkw9aDARJ_JBNWv7OuIgts1uH3ZQJO7c6xkc6PkaOkYe2Ik2hVsJIgibqV9t2hjAy28kJpNWjzIYGXd1JoNA6G_lHv366x0hEUSJjM" 1733 | }, 1734 | { 1735 | "sticker_id": 965, 1736 | "wear": null, 1737 | "name": "Merietta", 1738 | "image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulRNRULFV_eS1M7DQEh4IEtas6isLhN00szEcC9F6ZLux9ONzvP3Y-yJwTtX6pQj3-uWp9qs2A3n-kRkMjvxLNWcegNqYQ7Z5BHgliqAJ7zD" 1739 | } 1740 | ], 1741 | "wear": 0.053, 1742 | "published_at": "2023-04-23T21:07:36.874150Z", 1743 | "id": 148843931, 1744 | "depositor_stats": { 1745 | "delivery_rate_recent": 1, 1746 | "delivery_rate_long": 0.99, 1747 | "delivery_time_minutes_recent": 0, 1748 | "delivery_time_minutes_long": 17, 1749 | "steam_level_min_range": 5, 1750 | "steam_level_max_range": 10, 1751 | "user_has_trade_notifications_enabled": true, 1752 | "user_is_online": null 1753 | }, 1754 | "above_recommended_price": 191, 1755 | "purchase_price": 353 1756 | }, 1757 | { 1758 | "auction_ends_at": 1682284227, 1759 | "auction_highest_bid": null, 1760 | "auction_highest_bidder": null, 1761 | "auction_number_of_bids": 0, 1762 | "custom_price_percentage": 14, 1763 | "icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpot7HxfDhjxszJemkV09G3h5SOhe7LPr7Vn35cpsEl0-2Xrdii3APt-RI4ZG71IdOXelJoZVDX_li7kOu-1MW6uZ_JyHV9-n51hRUaMfs", 1764 | "is_commodity": false, 1765 | "market_name": "AK-47 | Elite Build (Field-Tested)", 1766 | "market_value": 266, 1767 | "name_color": "D2D2D2", 1768 | "preview_id": null, 1769 | "price_is_unreliable": false, 1770 | "stickers": [ 1771 | { 1772 | "sticker_id": 5132, 1773 | "wear": null, 1774 | "name": "Perfecto | Stockholm 2021", 1775 | "image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulROWEPTTOz_h52CHE59IjtHs6ijLgR03MzEcC9F6ZLmwdPTlqGjau7XxWoGvJRz272Uotqh3FLmrkBvMTvzJNWUdw8_NQqD5BHgljRT2dJr" 1776 | }, 1777 | { 1778 | "sticker_id": 4777, 1779 | "wear": null, 1780 | "name": "Liquid | 2020 RMR", 1781 | "image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulRPQV6CF7b9mMPaQmJ4JBZQs_Skf1Q41afJdTsX796zlYPclaWtMr3Vwm1XuJcpj-uRrdml3ADkqkNrfSmtc1IIUOC7" 1782 | }, 1783 | { 1784 | "sticker_id": 4536, 1785 | "wear": 0.7532175183296204, 1786 | "name": "Extermination", 1787 | "image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulRVTUDfCOG1w8rBXlR6JBBeubSaJwZy1PaGcmUTvI_hzNnSwPb2ZbmEkm4EuJUj276Xo4-mjgew-0BpZG-gcNTDIBh-Pw_rXqC9BQ" 1788 | }, 1789 | { 1790 | "sticker_id": 923, 1791 | "wear": 0.6144185066223145, 1792 | "name": "Flipsid3 Tactics | Cluj-Napoca 2015", 1793 | "image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulReQFnaFbT8goDVX1RkGghWpL2gZVVm16DOdT5G7t3kxobawPakN-uIwzgDv5Ap0rmVrNyk3FG1-EA-MmjtZNjCmcnHFc4" 1794 | } 1795 | ], 1796 | "wear": 0.346, 1797 | "published_at": "2023-04-23T21:07:37.029237Z", 1798 | "id": 148843957, 1799 | "depositor_stats": { 1800 | "delivery_rate_recent": 1, 1801 | "delivery_rate_long": 0.99, 1802 | "delivery_time_minutes_recent": 0, 1803 | "delivery_time_minutes_long": 17, 1804 | "steam_level_min_range": 5, 1805 | "steam_level_max_range": 10, 1806 | "user_has_trade_notifications_enabled": true, 1807 | "user_is_online": null 1808 | }, 1809 | "above_recommended_price": 8, 1810 | "purchase_price": 266 1811 | }, 1812 | { 1813 | "auction_ends_at": 1682284229, 1814 | "auction_highest_bid": null, 1815 | "auction_highest_bidder": null, 1816 | "auction_number_of_bids": 0, 1817 | "custom_price_percentage": 11, 1818 | "icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpovbSsLQJf3qr3czxb49KzgL-Khsj2P67UklRc7cF4n-SP9tXw3gLl-BZvamGhIIDAIwQ8NAyB_1C8wO-61pfvup_By3Yw63Uj7GGdwUKpIv7t7w", 1819 | "is_commodity": false, 1820 | "market_name": "★ M9 Bayonet | Blue Steel (Field-Tested)", 1821 | "market_value": 106933, 1822 | "name_color": "8650AC", 1823 | "preview_id": "13bbfe513e9c", 1824 | "price_is_unreliable": false, 1825 | "stickers": [], 1826 | "wear": 0.18, 1827 | "published_at": "2023-04-23T21:07:37.118648Z", 1828 | "id": 148844032, 1829 | "depositor_stats": { 1830 | "delivery_rate_recent": 1, 1831 | "delivery_rate_long": 1, 1832 | "delivery_time_minutes_recent": 1, 1833 | "delivery_time_minutes_long": 2, 1834 | "steam_level_min_range": 100, 1835 | "steam_level_max_range": 5000, 1836 | "user_has_trade_notifications_enabled": false, 1837 | "user_is_online": null 1838 | }, 1839 | "above_recommended_price": 5, 1840 | "purchase_price": 106933 1841 | } 1842 | ] 1843 | ] 1844 | ``` 1845 | 1846 |
1847 | 1848 | [[Back to contents](#contents)] 1849 | 1850 | ## updated_item 1851 | 1852 | Emitted when an existing item has been updated. For example, if status changes. 1853 | 1854 |
1855 | Event sample: 1856 | 1857 | ```json 1858 | ["updated_item", { 1859 | "app_id": 730, 1860 | "auction_auto_withdraw_failed": null, 1861 | "auction_ends_at": 1631921311, 1862 | "auction_highest_bid": null, 1863 | "auction_highest_bidder": null, 1864 | "auction_number_of_bids": 0, 1865 | "custom_name": null, 1866 | "description_type": "Souvenir Mil-Spec Grade SMG", 1867 | "icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou6r8FAZu7OHNdQJO5du-gM7bwqb2MeuClTsCv8Ek2LiZ9t2giwa28hVlZGD0doSUIANqYV_U_gC2366x0j0WoURS", 1868 | "img": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou6r8FAZu7OHNdQJO5du-gM7bwqb2MeuClTsCv8Ek2LiZ9t2giwa28hVlZGD0doSUIANqYV_U_gC2366x0j0WoURS", 1869 | "is_commodity": false, 1870 | "market_name": "Souvenir MP9 | Hot Rod (Factory New)", 1871 | "market_value": 3394, 1872 | "name": "Souvenir MP9 | Hot Rod (Factory New)", 1873 | "name_color": "FFD700", 1874 | "paint_index": null, 1875 | "paint_seed": null, 1876 | "preview_id": null, 1877 | "price_is_unreliable": 0, 1878 | "stickers": [], 1879 | "tradable": true, 1880 | "tradelock": false, 1881 | "updated_at": "2021-09-17 23:15:33", 1882 | "wear": null, 1883 | "published_at": "2021-09-17T23:25:31.111700Z", 1884 | "id": 10003, 1885 | }] 1886 | 1887 | ``` 1888 | 1889 |
1890 | 1891 | [[Back to contents](#contents)] 1892 | 1893 | ## auction_update 1894 | 1895 | Emitted when someone places a bid for an auction item. 1896 | 1897 |
1898 | Event sample: 1899 | 1900 | ```json 1901 | [ 1902 | { 1903 | "id": 148844336, 1904 | "above_recommended_price": 10, 1905 | "auction_highest_bid": 79, 1906 | "auction_highest_bidder": 3894061, 1907 | "auction_number_of_bids": 11, 1908 | "auction_ends_at": 1682284308 1909 | }, 1910 | { 1911 | "id": 148844305, 1912 | "above_recommended_price": 18, 1913 | "auction_highest_bid": 35, 1914 | "auction_highest_bidder": 2678443, 1915 | "auction_number_of_bids": 7, 1916 | "auction_ends_at": 1682284301 1917 | }, 1918 | { 1919 | "id": 148844241, 1920 | "above_recommended_price": 14, 1921 | "auction_highest_bid": 203, 1922 | "auction_highest_bidder": 7905183, 1923 | "auction_number_of_bids": 17, 1924 | "auction_ends_at": 1682284289 1925 | } 1926 | ] 1927 | 1928 | ``` 1929 | 1930 |
1931 | 1932 | [[Back to contents](#contents)] 1933 | 1934 | ## deleted_item 1935 | 1936 | Emitted when the item is not anymore available for withdrawing. Eg. the auction ends and the winner withdraws it. Contains an array of ids. 1937 | 1938 |
1939 | Event sample: 1940 | 1941 | ```json 1942 | [ 1943 | "deleted_item", 1944 | [ 1945 | 91997374, 1946 | 92044606, 1947 | 92019018, 1948 | 92044607, 1949 | 91997376, 1950 | 92044608, 1951 | 91997377 1952 | ] 1953 | ] 1954 | ``` 1955 | 1956 |
1957 | 1958 | [[Back to contents](#contents)] 1959 | 1960 | ## trade_status 1961 | 1962 | Emitted when the trade status gets updated. 1963 | 1964 |
1965 | Event sample: 1966 | 1967 | ```json 1968 | [ 1969 | "trade_status", 1970 | [ 1971 | { 1972 | "type": "withdrawal", 1973 | "data": { 1974 | "status": 6, 1975 | "status_message": "Completed", 1976 | "id": 19179038, 1977 | "item_id": 148842604, 1978 | "tradeoffer_id": 148842604, 1979 | "item": { 1980 | "market_name": "Sticker | Tyloo | Stockholm 2021", 1981 | "market_value": 0.31 1982 | }, 1983 | "total_value": 35 1984 | } 1985 | } 1986 | ] 1987 | ] 1988 | 1989 | ``` 1990 | 1991 |
1992 | 1993 | [[Back to contents](#contents)] 1994 | 1995 | ## deposit_failed 1996 | 1997 | Emitted when a deposit fails 1998 | 1999 |
2000 | Event sample: 2001 | 2002 | ```json 2003 | [ 2004 | "deposit_failed", 2005 | [ 2006 | { 2007 | "response": { 2008 | "data": { 2009 | "success": false, 2010 | "message": "\"Sticker | device (Gold) | Boston 2018\" (ID 3517043328) already exists in another deposit by you. Please select a different item.", 2011 | "error_key": "item_already_deposited", 2012 | "item_id": 30013 2013 | }, 2014 | "status": 400, 2015 | "statusText": "Bad Request" 2016 | } 2017 | } 2018 | ] 2019 | 2020 | ``` 2021 | 2022 |
2023 | 2024 | [[Back to contents](#contents)] 2025 | --------------------------------------------------------------------------------