Introduction
API Key Setup
- Some endpoints will require an API Key. Please register here to obtain an API key.
- The API key is viewable in the Profile -> API section.
- Never share your API key/secret key to ANYONE.
API Key Restrictions
- After creating the API key, the default restrictions is
Enable Reading
. - To enable withdrawals via API, the KYC process has to be completed, and the API key restriction needs to be modified by the admin.
Contact Us
- Customer Support
- For any questions in sudden drop in performance with the API and/or Websockets.
- For any questions on your code implementation with the API and/or Websockets.
- For any general questions about the API not covered in the documentation.
- For cases such as missing funds, help with 2FA, etc.
General Info
General API Information
- The base endpoint is: https://carbon.credit/api
- All http
POST
andPUT
endpoints expects a minified JSON. ({}
if there is no data to send.) - For
GET
endpoints, parameters must be sent in thequery string
. - For
POST
andPUT
endpoints, the parameters must be sent as therequest body
with content typeapplication/json
. - All http endpoints return either a minified JSON object or a minified JSON array.
HTTP Return Codes
- HTTP
200
return code is used for success or business reject responses. - HTTP
4XX
return codes are used for malformed requests; the issue is on the sender's side. - HTTP
403
return code is used when the WAF Limit (Web Application Firewall) has been violated. - HTTP
409
return code is used when a cancelReplace order partially succeeds. (e.g. if the cancellation of the order fails but the new order placement succeeds.) - HTTP
429
return code is used when breaking a request rate limit. - HTTP
418
return code is used when an IP has been auto-banned for continuing to send requests after receiving429
codes. - HTTP
5XX
return codes are used for internal errors; the issue is on carbon.credit's side. It is important to NOT treat this as a failure operation; the execution status is UNKNOWN and could have been a success.
Error Codes and Messages
- If there is an error, the API will return an error with a message of the reason.
The error payload on API is as follows:
{
"error":"Invalid symbol."
}
LIMITS
IP Limits
- Each route has a
weight
which determines for the number of requests each endpoint counts for. Heavier endpoints and endpoints that do operations on multiple symbols will have a heavierweight
. - When a 429 is received, it's your obligation as an API to back off and not spam the API.
- Repeatedly violating rate limits and/or failing to back off after receiving 429s will result in an automated IP ban (HTTP status 418).
- IP bans are tracked and scale in duration for repeat offenders, from 2 minutes to 3 days.
- A
Retry-After
header is sent with a 418 or 429 responses and will give the number of seconds required to wait, in the case of a 429, to prevent a ban, or, in the case of a 418, until the ban is over. - The limits on the API are based on the IPs, not the API keys.
Websocket Limits
- WebSocket connections have a limit of 5 incoming messages per second. A message is considered:
- A PING frame
- A PONG frame
- A JSON controlled message (e.g. subscribe, unsubscribe)
- A connection that goes beyond the limit will be disconnected; IPs that are repeatedly disconnected may be banned.
- A single connection can listen to a maximum of 1024 streams.
API Limit Introduction
The /api/*
endpoints adopt either of two access limiting rules, IP
limits or UID (account) limits.
Endpoints related to
/api/*
:- According to the two modes of IP and UID (account) limit, each are independent.
- Endpoints share the 1200 per minute limit based on IP.
Data Sources
- The API system is asynchronous, so some delay in the response is normal and expected.
- Each endpoint has a data source indicating where the data is being retrieved, and thus which endpoints have the most up-to-date response.
These are the three sources, ordered by which is has the most up-to-date response to the one with potential delays in updates.
- Matching Engine - the data is from the matching Engine
- Memory - the data is from a server's local or external memory
- Database - the data is taken directly from a database
Endpoint security type
- Each endpoint has a security type that determines how you will
interact with it. This is stated next to the NAME of the endpoint.
- If no security type is stated, assume the security type is NONE.
- API-keys are passed into the Rest API via the
X-MBX-APIKEY
header. - API-keys and secret-keys are case sensitive.
- By default, API-keys can access all secure routes.
Security Type | Description |
---|---|
NONE | Endpoint can be accessed freely. |
TRADE | Endpoint requires sending a valid API-Key and signature. |
USER_DATA | Endpoint requires sending a valid API-Key and signature. |
USER_STREAM | Endpoint requires sending a valid API-Key. |
MARKET_DATA | Endpoint requires sending a valid API-Key. |
TRADE
, andUSER_DATA
endpoints areSIGNED
endpoints.
SIGNED (TRADE, AND USER_DATA ) Endpoint security
SIGNED
endpoints require an additional parameter,signature
, to be sent in thehttp headers
.- Endpoints use
HMAC SHA256
signatures. TheHMAC SHA256 signature
is a keyedHMAC SHA256
operation. Use yoursecretKey
as the key andrequest body
as the value for the HMAC operation. - The
signature
is not case sensitive.
SIGNED Endpoint Examples for POST /api/v2/order
Here is a step-by-step example of how to send a valid signed payload from the
Linux command line using echo
, openssl
, and curl
.
Key | Value |
---|---|
apiKey | vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A |
secretKey | NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j |
Parameter | Value |
---|---|
symbol | LTC/BTC |
side | BUY |
type | LIMIT |
timeInForce | GTC |
quantity | 1 |
price | 0.1 |
timestamp | 1499827319559 |
Example : As a request body
Example
HMAC SHA256 signature:
$ echo -n "{"symbol":"LTC/BTC","side":"BUY","type":"LIMIT","timeInForce":"GTC","quantity":1,"price":0.1,"timestamp":1499827319559}" | openssl dgst -sha256 -hmac "NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j"
(stdin)= 57e52eb7945cdfa8938e607fa3e3c498dc531b0639e62c276d6f92e31f3095a1
curl command:
(HMAC SHA256)
$ curl -H 'X-MBX-APIKEY: vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A' -H 'signature: 57e52eb7945cdfa8938e607fa3e3c498dc531b0639e62c276d6f92e31f3095a1' -H 'Content-Type: application/json' -X POST 'https://carbon.credit/api/v2/order' -d '{"symbol":"LTC/BTC","side":"BUY","type":"LIMIT","timeInForce":"GTC","quantity":1,"price":0.1,"timestamp":1499827319559}'
- requestBody:
{
"symbol":"LTC/BTC",
"side":"BUY",
"type":"LIMIT",
"timeInForce":"GTC",
"quantity":1,
"price":0.1,
"timestamp":1499827319559
}
Public API Definitions
Terminology
These terms will be used throughout the documentation, so it is recommended especially for new users to read to help their understanding of the API.
base asset
refers to the asset that is thequantity
of a symbol. For the symbol BTC/USDC, BTC would be thebase asset.
quote asset
refers to the asset that is theprice
of a symbol. For the symbol BTC/USDC, USDC would be thequote asset
.
ENUM definitions
Symbol status (status):
- PRE_TRADING
- TRADING
- POST_TRADING
- END_OF_DAY
- HALT
- AUCTION_MATCH
- BREAK
Account and Symbol Permissions (permissions):
- SPOT
- MARGIN
- LEVERAGED
- TRD_GRP_002
- TRD_GRP_003
- TRD_GRP_004
- TRD_GRP_005
Order status (status):
Status | Description |
---|---|
NEW |
The order has been accepted by the engine. |
PARTIALLY_FILLED |
A part of the order has been filled. |
FILLED |
The order has been completed. |
CANCELED |
The order has been canceled by the user. |
PENDING_CANCEL |
Currently unused |
REJECTED |
The order was not accepted by the engine and not processed. |
EXPIRED |
The order was canceled according to the order type's rules (e.g. LIMIT FOK orders with no fill, LIMIT IOC or MARKET orders that partially fill) or by the exchange, (e.g. orders canceled during liquidation, orders canceled during maintenance) |
OCO Status (listStatusType):
Status | Description |
---|---|
RESPONSE |
This is used when the ListStatus is responding to a failed action. (E.g. Orderlist placement or cancellation) |
EXEC_STARTED |
The order list has been placed or there is an update to the order list status. |
ALL_DONE |
The order list has finished executing and thus no longer active. |
OCO Order Status (listOrderStatus):
Status | Description |
---|---|
EXECUTING |
Either an order list has been placed or there is an update to the status of the list. |
ALL_DONE |
An order list has completed execution and thus no longer active. |
REJECT |
The List Status is responding to a failed action either during order placement or order canceled.) |
Order types (orderTypes, type):
- LIMIT
- MARKET
- STOP_LOSS
- STOP_LOSS_LIMIT
- TAKE_PROFIT
- TAKE_PROFIT_LIMIT
- LIMIT_MAKER
Order Response Type (newOrderRespType):
- ACK
- RESULT
- FULL
Order side (side):
- BUY
- SELL
Time in force (timeInForce):
This sets how long an order will be active before expiration.
Status | Description |
---|---|
GTC |
Good Til Canceled An order will be on the book unless the order is canceled. |
IOC |
Immediate Or Cancel An order will try to fill the order as much as it can before the order expires. |
FOK |
Fill or Kill An order will expire if the full order cannot be filled upon execution. |
Kline/Candlestick chart intervals:
s-> seconds; m -> minutes; h -> hours; d -> days; w -> weeks; M -> months
- 1s
- 1m
- 3m
- 5m
- 15m
- 30m
- 1h
- 2h
- 4h
- 6h
- 8h
- 12h
- 1d
- 3d
- 1w
- 1M
Market Data Endpoints
Exchange Information
Response:
[
{
"exchangeFilters": [],
"rateLimits": [
{
"interval": "MINUTE",
"intervalNum": 1,
"limit": 900,
"rateLimitType": "ORDERS"
}
],
"serverTime": 1686824188823,
"instruments": [],
"instrumentPairs": [
[
53,
"ETH/USD",
1,
2,
2,
6,
1,
"null",
"PAIR",
"ETH",
"USDC",
"USDC",
"USDC",
"null",
"null",
2,
0.009999999776482582,
0.009999999776482582,
0,
0.01,
0,
-1,
0,
"",
0,
"M",
"",
0,
"",
"",
"",
-1,
0,
"",
"SECONDARY"
]
]
}
]
GET /api/v2/exchangeInfo
Current exchange trading rules and symbol information
Parameters:
There are 3 possible options:
Options | Example |
---|---|
No parameter | curl -X GET "https://carbon.credit/api/v2/exchangeInfo" |
verbose | curl -X GET "https://carbon.credit/api/v2/exchangeInfo?verbose=true" |
symbol | curl -X GET "https://carbon.credit/api/v2/exchangeInfo?symbol=CCC-USD" |
Notes:
- If the value provided to
symbol
orsymbols
do not exist, the endpoint will return an empty response. - Verbose option
verbose=true
returns a JSON with keys and values. - Verbose option
verbose=false
returns a JSON with only values (same order as inverbose=true
response) in a array. - All parameters are optional.
Data Source: Memory
Order Book
Response:
{
"lastUpdateId": 1027024,
"bids": [
[
"4.00000000", // PRICE
"431.00000000" // QTY
]
],
"asks": [
[
"4.00000200",
"12.00000000"
]
]
}
GET /api/v2/depth
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | e.g. ETH-USD |
limit | INT | NO | Default 100; max 5000. If limit > 5000, then the response will truncate to 5000. |
Data Source: Memory
Recent Trades List
Response:
[
{
"id": 28457,
"price": "4.00000100",
"qty": "12.00000000",
"quoteQty": "48.000012",
"time": 1499865549590,
"isBuyerMaker": true,
"isBestMatch": true
}
]
GET /api/v2/trades
Get recent trades.
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | e.g. ETH-USD |
limit | INT | NO | Default 500; max 1000. |
Data Source: Memory
Websocket Market Streams
- The base endpoint is: wss://carbon.credit
- Streams can be accessed either in a single raw stream or in a combined stream
- Raw streams are accessed at /ws/stream?/<streamName>
- Combined streams are accessed at /stream?streams=<streamName1>/<streamName2>/<streamName3>
- Combined stream events are wrapped as follows: {"stream":"<streamName>","data":<rawPayload>}
- All symbols for streams are lowercase
- A single connection to carbon.credit is only valid for 24 hours; expect to be disconnected at the 24 hour mark
- The websocket server will send a
ping frame
every 3 minutes. If the websocket server does not receive apong frame
back from the connection within a 10 minute period, the connection will be disconnected. Unsolicitedpong frames
are allowed.
Live Subscribing/Unsubscribing to streams
- The following data can be sent through the websocket instance in order to subscribe/unsubscribe from streams. Examples can be seen below.
- The
id
used in the JSON payloads is an unsigned INT used as an identifier to uniquely identify the messages going back and forth. - In the response, if the
result
received isnull
this means the request sent was a success.
Subscribe to a stream
Response
{
"result": null,
"id": 1
}
Request
{
"method": "SUBSCRIBE",
"params":
[
"BTC-USD@aggTrade",
"BTC-USD@depth"
],
"id": 1
}
Unsubscribe to a stream
Response
{
"result": null,
"id": 312
}
- Request
{
"method": "UNSUBSCRIBE",
"params":
[
"BTC-USD@depth"
],
"id": 312
}
Listing Subscriptions
Response
{
"result": [
"BTC-USD@aggTrade"
],
"id": 3
}
- Request
{
"method": "LIST_SUBSCRIPTIONS",
"id": 3
}
Setting Properties
Currently, the only property can be set is to set whether combined
stream payloads are enabled
or not.
The combined property is set to false
when connecting using /ws/
("raw streams")
and true
when connecting using /stream/
.
Response
{
"result": null,
"id": 5
}
- Request
{
"method": "SET_PROPERTY",
"params":
[
"combined",
true
],
"id": 5
}
Retrieving Properties
Response
{
"result": true, // Indicates that combined is set to true.
"id": 2
}
- Request
{
"method": "GET_PROPERTY",
"params":
[
"combined"
],
"id": 2
}
Error Messages
Error Message | Description |
---|---|
{"code": 0, "msg": "Unknown property", "id": '%s'} | Parameter used in the SET_PROPERTY or GET_PROPERTY was invalid |
{"code": 1, "msg": "Invalid value type: expected Boolean", "id": '%s'} | Value should only be true or false |
{"code": 2, "msg": "Invalid request: property name must be a string"} | Property name provided was invalid |
{"code": 2, "msg": "Invalid request: request ID must be an unsigned integer"} | Parameter id had to be provided or the value provided in the id parameter
is an unsupported type
|
{"code": 2, "msg": "Invalid request: unknown variant %s, expected one of SUBSCRIBE ,
UNSUBSCRIBE , LIST_SUBSCRIPTIONS , SET_PROPERTY , GET_PROPERTY
at line 1 column 28"}
|
Possible typo in the provided method or provided method was neither of the expected values |
{"code": 2, "msg": "Invalid request: too many parameters"} | Unnecessary parameters provided in the data |
{"code": 2, "msg": "Invalid request: property name must be a string"} | Property name was not provided |
{"code": 2, "msg": "Invalid request: missing field method at line 1 column 73"} |
method was not provided in the data |
{"code":3,"msg":"Invalid JSON: expected value at line %s column %s"} | JSON data sent has incorrect syntax. |
Aggregate Trade Streams
Payload:
{
"e": "aggTrade", // Event type
"E": 123456789, // Event time
"s": "CCC/USD", // Symbol
"a": 12345, // Aggregate trade ID
"p": "0.001", // Price
"q": "100", // Quantity
"f": 100, // First trade ID
"l": 105, // Last trade ID
"T": 123456785, // Trade time
"m": true, // Is the buyer the market maker?
"M": true // Ignore
}
The Aggregate Trade Streams push trade information that is aggregated for a single taker order.
Stream Name: <symbol>@aggTrade
Update Speed: Real-time
Trade Streams
Payload:
{
"e": "trade", // Event type
"E": 123456789, // Event time
"s": "CCC/USD", // Symbol
"t": 12345, // Trade ID
"p": "0.001", // Price
"q": "100", // Quantity
"b": 88, // Buyer order ID
"a": 50, // Seller order ID
"T": 123456785, // Trade time
"m": true, // Is the buyer the market maker?
"M": true // Ignore
}
The Trade Streams push raw trade information; each trade has a unique buyer and seller.
Stream Name: <symbol>@trade
Update Speed: Real-time
Kline/Candlestick Streams
Payload:
{
"e": "kline", // Event type
"E": 123456789, // Event time
"s": "CCC/USD", // Symbol
"k": {
"t": 123400000, // Kline start time
"T": 123460000, // Kline close time
"s": "CCC/USD", // Symbol
"i": "1m", // Interval
"f": 100, // First trade ID
"L": 200, // Last trade ID
"o": "0.0010", // Open price
"c": "0.0020", // Close price
"h": "0.0025", // High price
"l": "0.0015", // Low price
"v": "1000", // Base asset volume
"n": 100, // Number of trades
"x": false, // Is this kline closed?
"q": "1.0000", // Quote asset volume
"V": "500", // Taker buy base asset volume
"Q": "0.500", // Taker buy quote asset volume
"B": "123456" // Ignore
}
}
The Kline/Candlestick Stream push updates to the current klines/candlestick every second.
Stream Name: <symbol>@kline_<interval>
Update Speed: 2000ms
Kline/Candlestick chart intervals:
s-> seconds; m -> minutes; h -> hours; d -> days; w -> weeks; M -> months
- 1m
- 5m
- 15m
- 1h
- 1d
- 1w
Individual Symbol Mini Ticker Stream
Payload:
{
"e": "24hrMiniTicker", // Event type
"E": 123456789, // Event time
"s": "CCC/USD", // Symbol
"c": "0.0025", // Close price
"o": "0.0010", // Open price
"h": "0.0025", // High price
"l": "0.0010", // Low price
"v": "10000", // Total traded base asset volume
"q": "18" // Total traded quote asset volume
}
24hr rolling window mini-ticker statistics. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs.
Stream Name: <symbol>@miniTicker
Update Speed: 1000ms
All Market Mini Tickers Stream
Payload:
[
{
// Same as <symbol>@miniTicker payload
}
]
24hr rolling window mini-ticker statistics for all symbols that changed in an array. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. Note that only tickers that have changed will be present in the array.
Stream Name: !miniTicker@arr
Update Speed: 1000ms
Individual Symbol Ticker Streams
Payload:
{
"e": "24hrTicker", // Event type
"E": 123456789, // Event time
"s": "CCC/USD", // Symbol
"p": "0.0015", // Price change
"P": "250.00", // Price change percent
"w": "0.0018", // Weighted average price
"x": "0.0009", // First trade(F)-1 price (first trade before the 24hr rolling window)
"c": "0.0025", // Last price
"Q": "10", // Last quantity
"b": "0.0024", // Best bid price
"B": "10", // Best bid quantity
"a": "0.0026", // Best ask price
"A": "100", // Best ask quantity
"o": "0.0010", // Open price
"h": "0.0025", // High price
"l": "0.0010", // Low price
"v": "10000", // Total traded base asset volume
"q": "18", // Total traded quote asset volume
"O": 0, // Statistics open time
"C": 86400000, // Statistics close time
"F": 0, // First trade ID
"L": 18150, // Last trade Id
"n": 18151 // Total number of trades
}
24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs.
Stream Name: <symbol>@ticker
Update Speed: 1000ms
All Market Tickers Stream
Payload:
[
{
// Same as <symbol>@ticker payload
}
]
24hr rolling window ticker statistics for all symbols that changed in an array. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. Note that only tickers that have changed will be present in the array.
Stream Name: !ticker@arr
Update Speed: 1000ms
Individual Symbol Rolling Window Statistics Streams
Payload:
{
"e": "1hTicker", // Event type
"E": 123456789, // Event time
"s": "CCC/USD", // Symbol
"p": "0.0015", // Price change
"P": "250.00", // Price change percent
"o": "0.0010", // Open price
"h": "0.0025", // High price
"l": "0.0010", // Low price
"c": "0.0025", // Last price
"w": "0.0018", // Weighted average price
"v": "10000", // Total traded base asset volume
"q": "18", // Total traded quote asset volume
"O": 0, // Statistics open time
"C": 86400000, // Statistics close time
"F": 0, // First trade ID
"L": 18150, // Last trade Id
"n": 18151 // Total number of trades
}
Rolling window ticker statistics for a single symbol, computed over multiple windows.
Stream Name: <symbol>@ticker_<window_size>
Window Sizes: 1h,4h,1d
Update Speed: 1000ms
Note: This stream is different from the <symbol>@ticker
stream.
The open time O
always starts on a minute, while the closing time C
is the current
time of the update.
As such, the effective window might be up to 59999ms wider that <window_size>
.
All Market Rolling Window Statistics Streams
Payload:
[
{
// Same as <symbol>@ticker_<window-size> payload,
// one for each symbol updated within the interval.
}
]
Rolling window ticker statistics for all market symbols, computed over multiple windows. Note that only tickers that have changed will be present in the array.
Stream Name: !ticker_<window-size>@arr
Window Size: 1h,4h,1d
Update Speed: 1000ms
Individual Symbol Book Ticker Streams
Payload:
{
"u":400900217, // order book updateId
"s":"BNBUSDT", // symbol
"b":"25.35190000", // best bid price
"B":"31.21000000", // best bid qty
"a":"25.36520000", // best ask price
"A":"40.66000000" // best ask qty
}
Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol.
Multiple <symbol>@bookTicker
streams can be subscribed to over one connection.
Stream Name: <symbol>@bookTicker
Update Speed: Real-time
All Book Tickers Stream
Payload:
{
// Same as <symbol>@bookTicker payload
}
Pushes any update to the best bid or ask's price or quantity in real-time for all symbols.
Stream Name: !bookTicker
Update Speed: Real-time
Partial Book Depth Streams
Payload:
{
"lastUpdateId": 160, // Last update ID
"bids": [ // Bids to be updated
[
"0.0024", // Price level to be updated
"10" // Quantity
]
],
"asks": [ // Asks to be updated
[
"0.0026", // Price level to be updated
"100" // Quantity
]
]
}
Top
Stream Names: <symbol>@depth<levels>
OR <symbol>@depth<levels>@100ms
.
Update Speed: 1000ms or 100ms
Diff. Depth Stream
Payload:
{
"e": "depthUpdate", // Event type
"E": 123456789, // Event time
"s": "CCC/USD", // Symbol
"U": 157, // First update ID in event
"u": 160, // Final update ID in event
"b": [ // Bids to be updated
[
"0.0024", // Price level to be updated
"10" // Quantity
]
],
"a": [ // Asks to be updated
[
"0.0026", // Price level to be updated
"100" // Quantity
]
]
}
Stream Name: <symbol>@depth
OR <symbol>@depth@100ms
Update Speed: 1000ms or 100ms
Order book price and quantity depth updates used to locally manage an order book.
How to manage a local order book correctly
- Open a stream to wss://carbon.credit/ws/CCC-USD@depth.
- Buffer the events you receive from the stream.
- Get a depth snapshot from https://carbon.credit/api/v2/depth?symbol=CCC-USD&limit=1000 .
- Drop any event where
u
is <=lastUpdateId
in the snapshot. - The first processed event should have
U
<=lastUpdateId
+1 ANDu
>=lastUpdateId
+1. - While listening to the stream, each new event's
U
should be equal to the previous event'su
+1. - The data in each event is the absolute quantity for a price level.
- If the quantity is 0, remove the price level.
- Receiving an event that removes a price level that is not in your local order book can happen and is normal.
Note: Due to depth snapshots having a limit on the number of price levels, a price level outside of the initial snapshot that doesn't have a quantity change won't have an update in the Diff. Depth Stream. Consequently, those price levels will not be visible in the local order book even when applying all updates from the Diff. Depth Stream correctly and cause the local order book to have some slight differences with the real order book. However, for most use cases the depth limit of 5000 is enough to understand the market and trade effectively.
Spot Account/Trade
New Order (TRADE)
Response ACK:
{
"symbol": "BTC/USDC",
"orderId": 28,
"orderListId": -1, //Unless OCO, value will be -1
"clientOrderId": "6gCrw2kRUAF9CvJDGP16IP",
"transactTime": 1507725176595
}
Response RESULT:
{
"symbol": "BTC/USDC",
"orderId": 28,
"orderListId": -1, //Unless OCO, value will be -1
"clientOrderId": "6gCrw2kRUAF9CvJDGP16IP",
"transactTime": 1507725176595,
"price": "0.00000000",
"origQty": "10.00000000",
"executedQty": "10.00000000",
"cummulativeQuoteQty": "10.00000000",
"status": "FILLED",
"timeInForce": "GTC",
"type": "MARKET",
"side": "SELL",
"strategyId": 1, // This is only visible if the field was populated on order placement.
"strategyType": 1000000 // This is only visible if the field was populated on order placement.
}
POST /api/v2/order (HMAC SHA256)
Send in a new order.
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
side | ENUM | YES | Used with BUY , SELL |
type | ENUM | YES | Used with MARKET , LIMIT , STOP , STOP_LIMIT ,
SELECT |
timeInForce | ENUM | NO | Used with GTC , IOC , FOK , POST_ONLY |
quantity | DECIMAL | NO | |
price | DECIMAL | NO | |
newClientOrderId | STRING | NO | A unique id among open orders. Automatically generated if not sent. |
reduceOnly | BOOLEAN | NO | Used with true , false |
targetStrategy | INT | NO | Used with REDUCE_ONLY=101 , PROFIT_LIMIT=120 ,
PROFIT_LIMIT_REDUCE_ONLY=121 , PROFIT_MARKET=130 ,
PROFIT_MARKET_REDUCE_ONLY=131, STOP_MARKET= |
stopPrice | DECIMAL | NO | Used with STOP_LOSS , STOP_LOSS_LIMIT , TAKE_PROFIT , and TAKE_PROFIT_LIMIT
orders.
|
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES | |
expireTime | LONG | NO | |
instrumentId | LONG | NO | |
isHidden | INT | NO | Used with true1 , false=0 |
assetId | LONG | NO | Used with select assets |
tokenId | LONG | NO | Used with select assets |
groupAssetId | LONG | NO | Used with select assets |
selectId | LONG | NO | Used with select assets |
quoteType | ENUM | NO | Used with RFQ orders INDICATIVE , TRADEABLE ,
RESTRICTED_TRADEABLE , COUNTER_TRADEABLE , NONE |
quoteTargetUserId | LONG | NO | Used with select assets |
origOrdId | LONG | NO | |
price2 | DECIMAL | NO | |
actionType | INT | NO | Used with EDIT_RFQ_ORDER=1 , RESPOND_RFQ_ORDER=2 ,
ACCEPT_RFQ_ORDER=3 |
userId | LONG | NO | |
account | LONG | NO |
Additional mandatory parameters based on type
:
Type | Additional mandatory parameters |
---|---|
LIMIT |
timeInForce , quantity , price |
MARKET |
quantity or quoteOrderQty |
STOP_LOSS |
quantity , stopPrice or trailingDelta |
STOP_LOSS_LIMIT |
timeInForce , quantity , price , stopPrice or
trailingDelta |
TAKE_PROFIT |
quantity , stopPrice or trailingDelta |
TAKE_PROFIT_LIMIT |
timeInForce , quantity , price , stopPrice or
trailingDelta |
LIMIT_MAKER |
quantity , price |
Other info:
LIMIT_MAKER
areLIMIT
orders that will be rejected if they would immediately match and trade as a taker.STOP_LOSS
andTAKE_PROFIT
will execute aMARKET
order when thestopPrice
is reached.MARKET
orders using thequantity
field specifies the amount of thebase asset
the user wants to buy or sell at the market price.- For example, sending a
MARKET
order on BTC/USDC will specify how much BTC the user is buying or selling.
- For example, sending a
MARKET
orders usingquoteOrderQty
specifies the amount the user wants to spend (when buying) or receive (when selling) thequote
asset; the correctquantity
will be determined based on the market liquidity andquoteOrderQty
.- Using BTC/USDC as an example:
- On the
BUY
side, the order will buy as many BTC asquoteOrderQty
USDT can. - On the
SELL
side, the order will sell as much BTC needed to receivequoteOrderQty
USDT.
- On the
- Using BTC/USDC as an example:
MARKET
orders usingquoteOrderQty
will not breakLOT_SIZE
filter rules; the order will execute aquantity
that will have the notional value as close as possible toquoteOrderQty
.- same
newClientOrderId
can be accepted only when the previous one is filled, otherwise the order will be rejected. - For
STOP_LOSS
,STOP_LOSS_LIMIT
,TAKE_PROFIT_LIMIT
andTAKE_PROFIT
orders,trailingDelta
can be combined withstopPrice
.
Trigger order price rules against market price for both MARKET and LIMIT versions:
- Price above market price:
STOP_LOSS
BUY
,TAKE_PROFIT
SELL
- Price below market price:
STOP_LOSS
SELL
,TAKE_PROFIT
BUY
Data Source: Matching Engine
Cancel Order (TRADE)
Response:
{
"symbol": "LTC/BTC",
"origClientOrderId": "myOrder1",
"orderId": 4,
"orderListId": -1, //Unless part of an OCO, the value will always be -1.
"clientOrderId": "cancelMyOrder1",
"price": "2.00000000",
"origQty": "1.00000000",
"executedQty": "0.00000000",
"cummulativeQuoteQty": "0.00000000",
"status": "CANCELED",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY"
}
DELETE /api/v2/order (HMAC SHA256)
Cancel an active order.
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
orderId | LONG | NO | |
origClientOrderId | STRING | NO | |
newClientOrderId | STRING | NO | Used to uniquely identify this cancel. Automatically generated by default. |
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
Either orderId
or origClientOrderId
must be sent.
If both orderId
and origClientOrderId
are provided, orderId
takes
precedence.
Data Source: Matching Engine
Query Order (USER_DATA)
Response:
{
"symbol": "LTC/BTC",
"orderId": 1,
"orderListId": -1, //Unless OCO, value will be -1
"clientOrderId": "myOrder1",
"price": "0.1",
"origQty": "1.0",
"executedQty": "0.0",
"cummulativeQuoteQty": "0.0",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"stopPrice": "0.0",
"time": 1499827319559,
"updateTime": 1499827319559,
"isWorking": true,
"origQuoteOrderQty": "0.000000"
}
GET /api/v2/orderStatus (HMAC SHA256)
Check an order's status.
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
orderId | LONG | NO | |
origClientOrderId | STRING | NO | |
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
Notes:
- Either
orderId
ororigClientOrderId
must be sent. - For some historical orders
cummulativeQuoteQty
will be < 0, meaning the data is not available at this time.
Data Source: Memory => Database
Cancel Replace (TRADE)
Response SUCCESS:
//Both the cancel order placement and new order placement succeeded.
{
"cancelResult": "SUCCESS",
"newOrderResult": "SUCCESS",
"cancelResponse": {
"symbol": "BTC/USDC",
"origClientOrderId": "DnLo3vTAQcjha43lAZhZ0y",
"orderId": 9,
"orderListId": -1,
"clientOrderId": "osxN3JXAtJvKvCqGeMWMVR",
"price": "0.01000000",
"origQty": "0.000100",
"executedQty": "0.00000000",
"cummulativeQuoteQty": "0.00000000",
"status": "CANCELED",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "SELL"
},
"newOrderResponse": {
"symbol": "BTC/USDC",
"orderId": 10,
"orderListId": -1,
"clientOrderId": "wOceeeOzNORyLiQfw7jd8S",
"transactTime": 1652928801803,
"price": "0.02000000",
"origQty": "0.040000",
"executedQty": "0.00000000",
"cummulativeQuoteQty": "0.00000000",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"fills": []
}
}
Response when Cancel Order Fails with STOP_ON_FAILURE:
{
"code": -2022,
"msg": "Order cancel-replace failed.",
"data": {
"cancelResult": "FAILURE",
"newOrderResult": "NOT_ATTEMPTED",
"cancelResponse": {
"code": -2011,
"msg": "Unknown order sent."
},
"newOrderResponse": null
}
}
Response when Cancel Order Succeeds but New Order Placement Fails:
{
"code": -2021,
"msg": "Order cancel-replace partially failed.",
"data": {
"cancelResult": "SUCCESS",
"newOrderResult": "FAILURE",
"cancelResponse": {
"symbol": "BTC/USDC",
"origClientOrderId": "86M8erehfExV8z2RC8Zo8k",
"orderId": 3,
"orderListId": -1,
"clientOrderId": "G1kLo6aDv2KGNTFcjfTSFq",
"price": "0.006123",
"origQty": "10000.000000",
"executedQty": "0.000000",
"cummulativeQuoteQty": "0.000000",
"status": "CANCELED",
"timeInForce": "GTC",
"type": "LIMIT_MAKER",
"side": "SELL"
},
"newOrderResponse": {
"code": -2010,
"msg": "Order would immediately match and take."
}
}
}
Response when Cancel Order fails with ALLOW_FAILURE:
{
"code": -2021,
"msg": "Order cancel-replace partially failed.",
"data": {
"cancelResult": "FAILURE",
"newOrderResult": "SUCCESS",
"cancelResponse": {
"code": -2011,
"msg": "Unknown order sent."
},
"newOrderResponse": {
"symbol": "BTC/USDC",
"orderId": 11,
"orderListId": -1,
"clientOrderId": "pfojJMg6IMNDKuJqDxvoxN",
"transactTime": 1648540168818
}
}
}
Response when both Cancel Order and New Order Placement fail:
{
"code": -2022,
"msg": "Order cancel-replace failed.",
"data": {
"cancelResult": "FAILURE",
"newOrderResult": "FAILURE",
"cancelResponse": {
"code": -2011,
"msg": "Unknown order sent."
},
"newOrderResponse": {
"code": -2010,
"msg": "Order would immediately match and take."
}
}
}
POST /api/v2/order/cancelReplace
Cancels an existing order and places a new order on the same symbol.
Filters and Order Count are evaluated before the processing of the cancellation and order placement occurs.
A new order that was not attempted (i.e. when newOrderResult: NOT_ATTEMPTED
), will still
increase the order count by 1.
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
side | ENUM | YES | |
type | ENUM | YES | |
cancelReplaceMode | ENUM | YES | The allowed values are: STOP_ON_FAILURE - If the cancel request fails, the new
order placement will not be attempted. ALLOW_FAILURE - new order placement will be
attempted even if cancel request fails.
|
timeInForce | ENUM | NO | |
quantity | DECIMAL | NO | |
quoteOrderQty | DECIMAL | NO | |
price | DECIMAL | NO | |
cancelNewClientOrderId | STRING | NO | Used to uniquely identify this cancel. Automatically generated by default. |
cancelOrigClientOrderId | STRING | NO | Either the cancelOrigClientOrderId or cancelOrderId must be provided. If
both are provided, cancelOrderId takes precedence.
|
cancelOrderId | LONG | NO | Either the cancelOrigClientOrderId or cancelOrderId must be provided. If
both are provided, cancelOrderId takes precedence.
|
newClientOrderId | STRING | NO | Used to identify the new order. |
strategyId | INT | NO | |
strategyType | INT | NO | The value cannot be less than 1000000 . |
stopPrice | DECIMAL | NO | |
newOrderRespType | ENUM | NO | Allowed values: ACK , RESULT , FULL MARKET and LIMIT orders types default to FULL ; all other
orders default to ACK |
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
Similar to POST /api/v2/order
, additional mandatory parameters are determined by
type
.
Response format varies depending on whether the processing of the message succeeded, partially succeeded, or failed.
Data Source: Matching Engine
Current Open Orders (USER_DATA)
Response:
[
{
"symbol": "LTC/BTC",
"orderId": 1,
"orderListId": -1, //Unless OCO, the value will always be -1
"clientOrderId": "myOrder1",
"price": "0.1",
"origQty": "1.0",
"executedQty": "0.0",
"cummulativeQuoteQty": "0.0",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"stopPrice": "0.0",
"time": 1499827319559,
"updateTime": 1499827319559,
"isWorking": true,
"origQuoteOrderQty": "0.000000"
}
]
GET /api/v2/openOrders (HMAC SHA256)
Get all open orders on a symbol. Careful when accessing this with no symbol.
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | NO | |
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
- If the symbol is not sent, orders for all symbols will be returned in an array.
Data Source: Memory => Database
All Orders (USER_DATA)
Response:
[
{
"symbol": "LTC/BTC",
"orderId": 1,
"orderListId": -1, //Unless OCO, the value will always be -1
"clientOrderId": "myOrder1",
"price": "0.1",
"origQty": "1.0",
"executedQty": "0.0",
"cummulativeQuoteQty": "0.0",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"stopPrice": "0.0",
"time": 1499827319559,
"updateTime": 1499827319559,
"isWorking": true,
"origQuoteOrderQty": "0.000000"
}
]
GET /api/v2/allOrders (HMAC SHA256)
Get all account orders; active, canceled, or filled.
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
orderId | LONG | NO | |
startTime | LONG | NO | |
endTime | LONG | NO | |
limit | INT | NO | Default 500; max 1000. |
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
Notes:
- If
orderId
is set, it will get orders >= thatorderId
. Otherwise most recent orders are returned. - For some historical orders
cummulativeQuoteQty
will be < 0, meaning the data is not available at this time. - If
startTime
and/orendTime
provided,orderId
is not required.
Data Source: Database
Account Information (USER_DATA)
Response:
{
"makerCommission": 15,
"takerCommission": 15,
"buyerCommission": 0,
"sellerCommission": 0,
"canTrade": true,
"canWithdraw": true,
"canDeposit": true,
"brokered": false,
"updateTime": 123456789,
"accountType": "SPOT",
"balances": [
{
"asset": "BTC",
"free": "4723846.89208129",
"locked": "0.00000000"
},
{
"asset": "LTC",
"free": "4763368.68006011",
"locked": "0.00000000"
}
],
"permissions": [
"SPOT"
]
}
GET /api/v2/account (HMAC SHA256)
Get current account information.
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
Data Source: Memory => Database
Account Trade List (USER_DATA)
Response:
[
{
"symbol": "CCC/USD",
"id": 28457,
"orderId": 100234,
"orderListId": -1, //Unless OCO, the value will always be -1
"price": "4.00000100",
"qty": "12.00000000",
"quoteQty": "48.000012",
"commission": "10.10000000",
"commissionAsset": "USD",
"time": 1499865549590,
"isBuyer": true,
"isMaker": false,
"isBestMatch": true
}
]
GET /api/v2/myTrades (HMAC SHA256)
Get trades for a specific account and symbol.
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
orderId | LONG | NO | This can only be used in combination with symbol . |
startTime | LONG | NO | |
endTime | LONG | NO | |
fromId | LONG | NO | TradeId to fetch from. Default gets most recent trades. |
limit | INT | NO | Default 500; max 1000. |
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
Notes:
- If
fromId
is set, it will get id >= thatfromId
. Otherwise most recent trades are returned. - The time between
startTime
andendTime
can't be longer than 24 hours.
Data Source: Memory => Database
Query Current Order Count Usage (TRADE)
Response:
[
{
"rateLimitType": "ORDERS",
"interval": "SECOND",
"intervalNum": 10,
"limit": 10000,
"count": 0
},
{
"rateLimitType": "ORDERS",
"interval": "DAY",
"intervalNum": 1,
"limit": 20000,
"count": 0
}
]
GET /api/v2/rateLimit/order
Displays the user's current order count usage for all intervals.
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
Data Source: Memory
User Data Streams
- The base API endpoint is: https://carbon.credit
- A User Data Stream
listenKey
is valid for 60 minutes after creation. - Doing a
PUT
on alistenKey
will extend its validity for 60 minutes. - Doing a
DELETE
on alistenKey
will close the stream and invalidate thelistenKey
. - Doing a
POST
on an account with an activelistenKey
will return the currently activelistenKey
and extend its validity for 60 minutes. - The base websocket endpoint is: wss://carbon.credit
- User Data Streams are accessed at /ws/listenKey/<listenKey> or /ws/stream?streams=<listenKey>
- A single connection to wss://carbon.credit/ws is only valid for 24 hours; expect to be disconnected at the 24 hour mark
LISTEN KEY (SPOT)
Create a ListenKey (USER_STREAM)
Response:
{
"userId": 1,
"listenKey": "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1"
}
POST /api/v2/userDataStream
Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the
account has an active listenKey
, that listenKey
will be returned and its validity
will be extended for 60 minutes.
Parameters:
NONE
Data Source: Memory
Ping/Keep-alive a ListenKey (USER_STREAM)
Response:
{
"userId": 1,
"listenKey": "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1"
}
PUT /api/v2/userDataStream
Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes.
>Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
listenKey | STRING | YES |
Data Source: Memory
Close a ListenKey (USER_STREAM)
Response:
{}
DELETE /api/v2/userDataStream
Close out a user data stream.
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
listenKey | STRING | YES |
Data Source: Memory
LISTEN KEY (MARGIN)
Create a ListenKey (USER_STREAM)
Response:
{"listenKey": "T3ee22BIYuWqmvne0HNq2A2WsFlEtLhvWCtItw6ffhhdmjifQ2tRbuKkTHhr"}
POST /sapi/v1/userDataStream
Parameters:
NONE
Ping/Keep-alive a ListenKey (USER_STREAM)
Response:
{}
PUT /sapi/v1/userDataStream
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
listenKey | STRING | YES |
Close a ListenKey (USER_STREAM)
Response:
{}
DELETE /sapi/v1/userDataStream
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES |
Ping/Keep-alive a Listen Key (USER_STREAM)
Response:
{}
PUT /sapi/v1/userDataStream/isolated
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
listenKey | STRING | YES |
Close a ListenKey (USER_STREAM)
Response:
{}
DELETE /sapi/v1/userDataStream/isolated
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
listenKey | STRING | YES |
Payload: Account Update
outboundAccountPosition
is sent any time an account balance has changed and contains the assets
that were possibly changed by the event that generated the balance change.
Payload:
{
"e": "outboundAccountPosition", //Event type
"E": 1564034571105, //Event Time
"u": 1564034571073, //Time of last account update
"B": [ //Balances Array
{
"a": "ETH", //Asset
"f": "10000.000000", //Free
"l": "0.000000" //Locked
}
]
}
Payload: Balance Update
Balance Update occurs during the following:
- Deposits or withdrawals from the account
- Transfer of funds between accounts (e.g. Spot to Margin)
Payload
{
"e": "balanceUpdate", //Event Type
"E": 1573200697110, //Event Time
"a": "BTC", //Asset
"d": "100.00000000", //Balance Delta
"T": 1573200697068 //Clear Time
}
Payload: Order Update
Orders are updated with the executionReport
event.
Check the Public API Definitions and below for relevant enum definitions.
Average price can be found by doing Z
divided by z
.
Payload:
{
"e": "executionReport", // Event type
"E": 1499405658658, // Event time
"s": "ETH/BTC", // Symbol
"c": "mUvoqJxFIILMdfAW5iGSOW", // Client order ID
"S": "BUY", // Side
"o": "LIMIT", // Order type
"f": "GTC", // Time in force
"q": "1.00000000", // Order quantity
"p": "0.10264410", // Order price
"P": "0.00000000", // Stop price
"d": 4, // Trailing Delta; This is only visible if the order was a trailing stop order.
"F": "0.00000000", // Iceberg quantity
"g": -1, // OrderListId
"C": "", // Original client order ID; This is the ID of the order being canceled
"x": "NEW", // Current execution type
"X": "NEW", // Current order status
"r": "NONE", // Order reject reason; will be an error code.
"i": 4293153, // Order ID
"l": "0.00000000", // Last executed quantity
"z": "0.00000000", // Cumulative filled quantity
"L": "0.00000000", // Last executed price
"n": "0", // Commission amount
"N": null, // Commission asset
"T": 1499405658657, // Transaction time
"t": -1, // Trade ID
"I": 8641984, // Ignore
"w": true, // Is the order on the book?
"m": false, // Is this trade the maker side?
"M": false, // Ignore
"O": 1499405658657, // Order creation time
"Z": "0.00000000", // Cumulative quote asset transacted quantity
"Y": "0.00000000", // Last quote asset transacted quantity (i.e. lastPrice * lastQty)
"Q": "0.00000000", // Quote Order Qty
"j": 1, // Strategy ID; This is only visible if the strategyId parameter was provided upon order placement
"J": 1000000 // Strategy Type; This is only visible if the strategyType parameter was provided upon order placement
}
Execution types:
- NEW - The order has been accepted into the engine.
- CANCELED - The order has been canceled by the user.
- REPLACED (currently unused)
- REJECTED - The order has been rejected and was not processed (This message appears only with Cancel Replace Orders wherein the new order placement is rejected but the request to cancel request succeeds.)
- TRADE - Part of the order or all of the order's quantity has filled.
- EXPIRED - The order was canceled according to the order type's rules (e.g. LIMIT FOK orders with no fill, LIMIT IOC or MARKET orders that partially fill) or by the exchange, (e.g. orders canceled during liquidation, orders canceled during maintenance)
Payload
{
"e": "listStatus", //Event Type
"E": 1564035303637, //Event Time
"s": "ETH/BTC", //Symbol
"g": 2, //OrderListId
"c": "OCO", //Contingency Type
"l": "EXEC_STARTED", //List Status Type
"L": "EXECUTING", //List Order Status
"r": "NONE", //List Reject Reason
"C": "F4QN4G8DlFATFlIUQ0cjdD", //List Client Order ID
"T": 1564035303625, //Transaction Time
"O": [ //An array of objects
{
"s": "ETH/BTC", //Symbol
"i": 17, // orderId
"c": "AJYsMjErWJesZvqlJCTUgL" //ClientOrderId
},
{
"s": "ETH/BTC",
"i": 18,
"c": "bfYPSQdLoqAJeNrOr9adzq"
}
]
}