BinanceTR
BinanceTR API Information
BinanceTR API Link: https://www.binance.tr/apidocs/#api-document-description
Main Endpoints
- Base endpoint:
https://www.binance.tr - Alternative base endpoint for specific APIs:
https://api.binance.me
Response Format
- Data format: All endpoints return a JSON object.
- Ordering: Ascending (Oldest data first, newest data last).
Time Parameters
- All time and timestamp related fields are in milliseconds.
HTTP Return Codes
BinanceTR API Link: https://www.binance.tr/apidocs/#general-api-information
4XXreturn codes: are used for malformed requests; the issue is on the sender’s side.403return code: is used when the WAF Limit (Web Application Firewall) has been violated.429return code: is used when breaking a request rate limit.418return code: is used when an IP has been auto-banned for continuing to send requests after receiving 429 codes.5XXreturn codes: are used for internal errors; the issue is on Server’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 Messages
| Error Message | Description |
|---|---|
{"code": 0, "msg": "Unknown property"} |
Parameter used in the SET_PROPERTY or GET_PROPERTY was invalid. |
{"code": 1, "msg": "Invalid value type: expected Boolean"} |
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. |
General Information on Endpoints
BinanceTR API Link: https://www.binance.tr/apidocs/#general-information-on-endpoints
- For
GETendpoints, parameters must be sent as aquery string. - For
POSTendpoints, the parameters may be sent as aquery stringor in the request body with content typeapplication/x-www-form-urlencoded. You may mix parameters between both thequery stringandrequest bodyif you wish to do so. - Parameters may be sent in any order.
- If a parameter sent in both the
query stringandrequest body, the body string parameter will be used.
LIMITS
BinanceTR API Link: https://www.binance.tr/apidocs/#general-info-on-limits
General Info on Limits
- IntervalLetter Values:
SECOND=>SMINUTE=>MdHOUR=>HDAY=>D
intervalNum describes the amount of the interval. For example, intervalNum 5 with intervalLetter M means “Every 5 minutes”.
A 429 will be returned when either rate limit is violated.
IP Limits
- Every request will contain
X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)in the response headers which has the current used weight for the IP for all request rate limiters defined. - Each route has a
weightwhich 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
429is 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.
- The limits on the API are based on the IPs, not the API keys.
Order Rate Limits
- Every successful order response will contain a
X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)header which has the current order count for the account for all order rate limiters defined. - Rejected/unsuccessful orders are not guaranteed to have
X-MBX-ORDER-COUNT-**headers in the response. - The order rate limit is counted against each account.
RCXT BinanceTR API Bilgileri
BinanceTR exchange has 2 Base Endpoints:
- apiUrl:
api.binance.com - apiUrlTr:
www.trbinance.com
Since BinanceTR does not have a ticker endpoint, we use the Binance ticker endpoint as the ticker endpoint.
Rate Limits
On the BinanceTR exchange, ratelimits are determined on an endpoint basis:
| API Type | Limit(1 Minute) |
|---|---|
| apiUrlTr | 1.200 Request Weight |
On the BinanceTR exchange, the ratelimit defined for each endpoint is as follows:
| Limit (1 Minute) | Spot | Transfer In | Transfer Out |
|---|---|---|---|
| Fetch Balances | 20 Request Weight | ||
| Fetch Trades | 20 Request Weight | ||
| Fetch Orders | 20 Request Weight | ||
| Fetch DepositWithdrawals | 1 Request Weight | 18000 Request Weight(UID) |
- UID (User Identifier) is a unique identification number that uniquely identifies each user. In the Binance API, a specific rate limit is applied to user requests, and this limit is determined specifically for each user based on their UID.
Fetch Balances
Spot Balance
- The Base Endpoint is
apiUrlTr(www.trbinance.com). - The Endpoint used is
/open/v1/account/spot. - The RCXT Endpoint is
api/v1/binance-tr/balances.
The user sends a GET request to query BinanceTR wallet balances.
This request should include the required header and query parameters:
-
The
apiKeyandsecretKeyvalues are obtained from the header. -
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight for Spot Balance is 20.
Response Example:
{
"spot": [
{
"coin": "SHIB", #asset
"total": "41634.28"
}
],
"margin": null,
"isolatedMargin": null,
"futures": null,
"earnings": null
}Fetch Trades
Spot Trades
-
The Base Endpoint is
apiUrlTr(www.trbinance.com). -
The Endpoint used is
/open/v1/orders/trades. -
The RCXT Endpoint is
api/v1/binance-tr/trades. -
The
apiKeyandsecretKeyvalues are obtained from the header. -
Query parameters
startTime,symbol,fromId, andtypeare used:startTime: The date from which we want to retrieve the data.symbol: Specifies the symbol pair for the trade (e.g. BTCUSDT).fromId: If we want to get a specific trade, the trade ID is provided.type: The only available value is spot. For Spot Trades, spot should be selected.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight for Spot Trades is 20.
- A maximum of 1000 data points can be retrieved per page.
Response Example:
{
"trades": [
{
"orderId": "226664511", #orderId
"tradeId": "27082209", #tradeId
"isBuyer": false, #isBuyer
"isMaker": false, #isMaker
"price": "0.07610000", #price
"quantity": "199.90000000",
"symbol": "ACAUSDT", #symbol
"time": 1737552748284, #time
"commission": "0.01521239", #commission
"commissionCurrency": "USDT" #commissionAsset
}
],
"cursor": ""
}Fetch Orders
Spot Orders
-
The Base Endpoint is
apiUrlTr(www.trbinance.com). -
The Endpoint used is
/open/v1/orders. -
The RCXT Endpoint is
api/v1/binance-tr/orders. -
The
apiKeyandsecretKeyvalues are obtained from the header. -
Query parameters
startTime,endTime,symbol,orderId,singleOrderId,type, andorderStatusare used:startTime: The date from which we want to retrieve the data.endTime: The date until which we want to retrieve the data.symbol: Specifies the symbol pair for the trade (e.g. BTCUSDT).orderId: Used to filter by a specific order ID.singleOrderId: Used to filter by a single order ID.type: The available value is spot. For Spot Orders, spot should be selected.orderStatus: IforderStatusis “open”, it retrieves Open Orders. If “closed”, it retrieves Closed Orders.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight for Spot Orders is 20.
- A maximum of 1000 data points can be retrieved per page.
Spot Open Orders
-
The Base Endpoint is
apiUrlTr(www.trbinance.com). -
The Endpoint used is
/open/v1/orders. -
The RCXT Endpoint is
api/v1/binance-tr/orders. -
The
apiKeyandsecretKeyvalues are obtained from the header. -
Query parameters
startTime,endTime,symbol,orderId,singleOrderId,type, andorderStatusare used:startTime: The date from which we want to retrieve the data.endTime: The date until which we want to retrieve the data.symbol: Specifies the symbol pair for the trade (e.g. BTCUSDT).orderId: Used to filter by a specific order ID.singleOrderId: Used to filter by a single order ID.type: The available value is spot. For Spot Open Orders, spot should be selected.orderStatus: IforderStatusis “open”, it retrieves Open Orders. If “closed”, it retrieves Closed Orders.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight for Spot Open Orders is 20.
- A maximum of 1000 data points can be retrieved per page.
Response Example:
{
"orders": [
{
"orderId": "904606155", #orderId
"symbol": "PEPEUSDT", #symbol
"type": "1", #type
"price": "0.00001743", #price
"side": "0", #side
"time": 1734880852244, #createTime
"status": "CLOSED", #status
"executedQuantity": "339374", #executedQty
"quantity": "339374" #origQty , executeQty
}
],
"cursor": ""
}Fetch DepositsWithdrawals
TransferIn
-
The Base Endpoint is
apiUrlTr(www.trbinance.com). -
The Endpoint used is
/open/v1/deposits. -
The RCXT Endpoint is
api/v1/binance-tr/deposit-withdraw-history. -
The
apiKeyandsecretKeyvalues are obtained from the header. -
Query parameters
startTime,offset,page, andtypeare used:startTime: The date from which we want to retrieve the data.fromId: The ID of a specific trade, if we want to retrieve that particular trade.page: Used for pagination, specifies which page to retrieve.type: The available values are transferIn and transferOut. For Transfer In, transferIn should be selected.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight for TransferIn is 1.
TransferOut
-
The Base Endpoint is
apiUrlTr(www.trbinance.com). -
The Endpoint used is
/open/v1/withdraws. -
The RCXT Endpoint is
api/v1/binance-tr/deposit-withdraw-history. -
The
apiKeyandsecretKeyvalues are obtained from the header. -
Query parameters
startTime,offset,page, andtypeare used:startTime: The date from which we want to retrieve the data.fromId: The ID of a specific trade, if we want to retrieve that particular trade.page: Used for pagination, specifies which page to retrieve.type: The available values are transferIn and transferOut. For Transfer Out, transferOut should be selected.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight for TransferOut is 18000.
Response Example:
{
"depositWithdrawals": [
{
"fiatCurrency": "",
"cryptoCurrency": "USDT", #asset
"fiatAmount": "",
"cryptoAmount": "90", #amount
"price": "",
"address": "TQ8m4ftX9648gDHga3ATRqg9PurwP", #address
"orderId": "",
"transactionId": "18260010", #id
"fee": "",
"network": "TRX", #network
"status": "1", #status
"time": 1711804652000 #insertTime
}
],
"cursor": ""
}Fetch Ticker
Ticker
-
The Base Endpoint is
apiUrl(api.binance.com). -
The Endpoint used is
/api/v3/ticker/price. -
The RCXT Endpoint is
api/v1/binance-tr/ticker. -
api.binance.com/api/v3/ticker/price: Returns the symbol and current price for each cryptocurrency pair. -
The query parameter only accepts the
symbolvalue (e.g., BTCUSDT).symbol: Specifies the symbol of the cryptocurrency pair.
Response Example:
{
"symbol": "BTCUSDT", #symbol
"price": "104562.53000000" #price
}