* All endpoints return either a JSON object or array.
* Data is returned in **ascending** order. Oldest first, newest last.
* All time and timestamp related fields are in milliseconds.
EDAX side.
It is important to **NOT** treat this as a failure operation; the execution status is
**UNKNOWN** and could have been a success.
* Any endpoint can return an ERROR; the error payload is as follows:
```javascript
{
"code": -1121,
"msg": "Invalid symbol."
}
```
* Specific error codes and messages defined in another document.
* For `GET` endpoints, parameters must be sent as a `query string`.
* For `POST`, `PUT`, and `DELETE` endpoints, the parameters may be sent as a
`query string` or in the `request body` with content type
`application/x-www-form-urlencoded`. You may mix parameters between both the
`query string` and `request body` if you wish to do so.
* Parameters may be sent in any order.
* If a parameter sent in both the `query string` and `request body`, the
`query string` parameter will be used.
# LIMITS
* Every IP can send request to API 432.000 calls (5 times * 24h * 60m * 60s ) with a frequency at once a day.
* Please note that making more than 6 calls per second to the public API, or repeatedly and needlessly fetching excessive amounts of data, can result in your IP being banned.
* If your IP violates this limit, it will be banned.
* The banned IP will be removed from the banning list after about 2 minutes to 1 days
# There are six public methods, all of which take HTTP GET requests and return output in JSON format:
# Endpoint security type
* Each endpoint has a security type that determines the how you will interact with it.
* API-keys are passed into the Rest API via the `X-MBX-APIKEY` header.
* API-keys and secret-keys **are case sensitive**.
* API-keys can be configured to only access certain types of secure endpoints.
For example, one API-key could be used for TRADE only, while another API-key
can access everything except for TRADE routes.
* 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` and `USER_DATA` endpoints are `SIGNED` endpoints.
# SIGNED (TRADE and USER_DATA) Endpoint security
* `SIGNED` endpoints require an additional parameter, `signature`, to be
sent in the `query string` or `request body`.
* Endpoints use `HMAC SHA256` signatures. The `HMAC SHA256 signature` is a keyed `HMAC SHA256` operation.
Use your `secretKey` as the key and `totalParams` as the value for the HMAC operation.
* The `signature` is **not case sensitive**.
* `totalParams` is defined as the `query string` concatenated with the`request body`.
h3 class="standard">## Timing security
* A `SIGNED` endpoint also requires a parameter, `timestamp`, to be sent which
should be the millisecond timestamp of when the request was created and sent.`
* An additional parameter, `recvWindow`, may be sent to specify the number of
milliseconds after `timestamp` the request is valid for. If `recvWindow`
is not sent, **it defaults to 5000**.`
fromId | hexString | NO | ID to get aggregate trades from INCLUSIVE.
startTime | LONG | NO | Timestamp in ms to get aggregate trades from INCLUSIVE.
endTime | LONG | NO | Timestamp in ms to get aggregate trades until INCLUSIVE.
* If both startTime and endTime are sent, time between startTime and endTime must be less than 1 hour.
* If fromId, startTime, and endTime are not sent, the most recent aggregate trades will be returned.
**Response:**
```javascript
[{
"a":"5b8d959bebe6c97938d07971",// Aggregate tradeId
"f":"5b8d959bebe6c97938d07971",// First tradeId
"l":"5b8d959bebe6c97938d07971",// Last tradeId
"p":0.0000054,// Price
"q":61,// Quantity
"T":1536005531820,// Timestamp
"m":false,// Was the buyer the maker?
"M":true // Was the trade the best price match?
},
{
"a":"5b8d959bebe6c97938d07973",
"f":"5b8d959bebe6c97938d07973",
"l":"5b8d959bebe6c97938d07973",
"p":0.0000054,"q":29,
"T":1536005531884,
"m":false,"M":true
}]
```
### 10. Kline/Candlestick data
GET /api/v1/klines
Kline/candlestick bars for a symbol.
Klines are uniquely identified by their open time.
startTime | LONG | NO | Timestamp in ms to get aggregate trades from INCLUSIVE.
endTime | LONG | NO | Timestamp in ms to get aggregate trades until INCLUSIVE.
** If startTime and endTime are not sent, the most recent klines are returned.
**Response:**
```javascript
[
[
1535168400000, // Open time
"0.041755", // Open
"0.041755", // High
"0.041755", // Low
"0.041755", // Close
"0.01", // Volume
1535168459000, // Close time
"1000000", // Quote asset volume
"2" // Number of trades
]
]
[linux]$ curl -H "X-MBX-APIKEY: vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A" -X POST 'https://api.bankcex.com/api/v1/order' -d 'symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559&signature=c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71'
```
Contact Us
Energy innovations ready to serve every connection to community development.
Connecting organizations to organizations through innovation Connecting organizations around the world Giving everyone access to funding sources safely. Do not take advantage of consumers and encourage every community to access technology.
Follow Us: