Btcturk

Btcturk

BtcTurk API Information

BtcTurk API Link: https://docs.btcturk.com

Base Endpoints

  • Base Endpoint: https://api.btcturk.com

General Information - Endpoints

  • All endpoints return a JSON object model on successful requests.
  • Requests related to authentication must be sent as application/json.
  • For GET endpoints, parameters should be sent as a query string.
  • Parameters can be sent in any order.

Time Parameters

  • All timestamps, except for the OHLC Chart, are in milliseconds. The OHLC Chart returns values in seconds.

HTTP Return Codes

BtcTurk API Link: https://docs.btcturk.com/errors

  • 400 Bad Request – Your request is invalid.
  • 401 Unauthorized – Your Public/Private API key is incorrect.
  • 404 Not Found – No such object exists.
  • 405 Wrong Method – You are using the wrong HTTP method for the API.
  • 429 Too Many Requests – You exceeded the request rate limit.
  • 5xx Internal Server Error – A problem occurred on our server. Please try again later.
  • 503 Service Unavailable – We are temporarily offline for maintenance. Please try again later.

LIMITS

BtcTurk API Link: https://docs.btcturk.com/rate-limits

General Information

  • Limit: Indicates the number of requests that can be sent within the specified period.
  • Period: Indicates the duration of the rule. The rate limit period starts with the first request for each endpoint.
  • Blocks: Indicates the timeout duration of the block period.
  • Policy: Indicates the rule’s policy. (Account based, IP based)
  • Retry-After: When you receive a 429 (Too Many Requests) response, this shows how long you must wait before making a new request. This information is returned in the header.

RCXT BtcTurk API Information

There is 1 Base Endpoint for the BtcTurk exchange:

  • apiUrl: https://api.btcturk.com

Rate Limits

On the Binance exchange, the rate limit set for each endpoint is as follows:

Limit (1 second) Spot DepositWithdrawals FiatBuyFiatSell TransferIn Transfer Out Ticker
Fetch DepositWithdrawal 90 Request Weight 90 Request Weight 90 Request Weight 90 Request Weight
Fetch Balances 120 Request Weight
Fetch Orders 300 Request Weight
Fetch Trades 120 Request Weight
Fetch Ticker 600 Request Weight

Fetch Balances

Spot Balance
  • Uses apiUrl(https://api.btcturk.com) as the Base Endpoint.
  • Uses /api/v2/spot/account/assets as the Endpoint.
  • Uses api/v1/btcturk/balances as the RCXT Endpoint.

The user sends a GET request to query BtcTurk wallet balances. This request must include the required header parameters:

  • apiKey and secretKey values are taken from the header.

  • Limiter:

    • Each API endpoint has a specific Request Weight value assigned. The Request Weight value for Spot Balance is 120.

Response Example:

{
  "spot": [
    {
      "coin": "XRP",
      "total": "16.3881371610431578"
    }
  ],
  "margin": null,
  "isolatedMargin": null,
  "futures": null,
  "earnings": null
}

Fetch Trades

Spot Trades
  • Uses apiUrl(https://api.btcturk.com) as the Base Endpoint.

  • Uses /api/v2/spot/trade/fills as the Endpoint.

  • Uses api/v1/btcturk/trades as the RCXT Endpoint.

  • apiKey and secretKey values are taken from the header.

  • From query parameters, startTime, symbol, and fromId values are taken:

    • startTime: The date from which we want to fetch the data.
    • symbol: The trading pair symbol we want to fetch trades for. (e.g. BTCUSDT)
    • fromId: If we want to fetch a specific trade, we enter the trade’s ID.
  • Limiter:

    • Each API endpoint has a specific Request Weight value assigned. The Request Weight value for Spot Trades is 120.

Response Example:

{
  "trades": [
    {
      "orderId": "27138600950",
      "tradeId": "1016063839979168329",
      "isBuyer": true,
      "isMaker": false,
      "price": "112.746",
      "quantity": "16.5041371610431578",
      "symbol": "XRPTRY",
      "time": 1737531114760,
      "commission": "3.10129303",
      "commissionCurrency": "TRY"
    }
  ],
  "cursor": ""
}

Fetch Orders

Spot Orders
  • Uses apiUrl(https://api.btcturk.com) as the Base Endpoint.

  • Uses /api/v1/allOrders as the Endpoint.

  • Uses api/v1/btcturk/orders as the RCXT Endpoint.

  • apiKey and secretKey values are taken from the header.

  • From query parameters, startTime, singleOrderId, symbol, orderStatus, fromId, and page values are taken:

    • startTime: The date from which we want to fetch the data.
    • symbol: The trading pair symbol we want to fetch orders for. (e.g. BTCUSDT)
    • singleOrderId: Used to filter a single order by its OrderID.
    • fromId: If we want to fetch a specific order, we enter the order’s ID.
    • page: Used for pagination, specifies which page number to fetch.
    • orderStatus: If orderStatus is “open”, it fetches Open Orders; if “closed”, it fetches Closed Orders.
  • Limiter:

    • Each API endpoint has a specific Request Weight value assigned. The Request Weight value for Spot Orders is 300.
Spot Open Orders
  • Uses apiUrl(https://api.btcturk.com) as the Base Endpoint.

  • Uses /api/v1/openOrders as the Endpoint.

  • Uses api/v1/btcturk/orders as the RCXT Endpoint.

  • apiKey and secretKey values are taken from the header.

  • From query parameters, startTime, singleOrderId, symbol, orderStatus, fromId, and page values are taken:

    • startTime: The date from which we want to fetch the data.
    • symbol: The trading pair symbol we want to fetch orders for. (e.g. BTCUSDT)
    • singleOrderId: Used to filter a single order by its OrderID.
    • fromId: If we want to fetch a specific order, we enter the order’s ID.
    • page: Used for pagination, specifies which page number to fetch.
    • orderStatus: If orderStatus is “open”, it fetches Open Orders; if “closed”, it fetches Closed Orders.
  • Limiter:

    • Each API endpoint has a specific Request Weight value assigned. The Request Weight value for Spot Orders is 300.

Response Example:

{
  "orders": [
    {
      "orderId": "27138707870",
      "symbol": "XRPTRY",
      "type": "limit",
      "price": "112.492",
      "side": "SELL",
      "time": 1737531783703,
      "status": "CLOSED",
      "executedQuantity": "16.5041",
      "quantity": "16.5041"
    }
  ],
  "cursor": ""
}

Fetch DepositWithdrawal

Deposit Withdrawal
  • Uses apiUrl(https://api.btcturk.com) as the Base Endpoint.

  • Uses /api/v1/users/transactions/fiat as the Endpoint.

  • Uses api/v1/btcturk/deposit-withdraw-history as the RCXT Endpoint.

  • apiKey and secretKey values are taken from the header.

  • From query parameters, startTime, offset, and transactionType are used:

    • startTime: The date from which we want to fetch the data.
    • offset: Parameter that specifies how many records to skip in the transaction list. Used for pagination.
    • transactionType: Possible values are deposit, withdrawal, fiatBuy, fiatSell, transferIn, and transferOut. Use deposit for Deposit and withdrawal for Withdrawal.
  • Limiter:

    • Each API endpoint has a specific Request Weight value assigned. The Request Weight value for DepositWithdrawal is 90.
FiatBuyFiatSell
  • Uses apiUrl(https://api.btcturk.com) as the Base Endpoint.

  • Uses /api/v1/users/transactions/fiat as the Endpoint.

  • Uses api/v1/btcturk/deposit-withdraw-history as the RCXT Endpoint.

  • apiKey and secretKey values are taken from the header.

  • From query parameters, startTime, offset, and transactionType are used:

    • startTime: The date from which we want to fetch the data.
    • offset: Parameter that specifies how many records to skip in the transaction list. Used for pagination.
    • transactionType: Possible values are deposit, withdrawal, fiatBuy, fiatSell, transferIn, and transferOut. Use fiatBuy for FiatBuy and fiatSell for FiatSell.
  • Limiter:

    • Each API endpoint has a specific Request Weight value assigned. The Request Weight value for FiatBuyFiatSell is 90.
TransferIn TransferOut
  • Uses apiUrl(https://api.btcturk.com) as the Base Endpoint.

  • Uses /api/v1/users/transactions/fiat as the Endpoint.

  • Uses api/v1/btcturk/deposit-withdraw-history as the RCXT Endpoint.

  • apiKey and secretKey values are taken from the header.

  • From query parameters, startTime, offset, and transactionType are used:

    • startTime: The date from which we want to fetch the data.
    • offset: Parameter that specifies how many records to skip in the transaction list. Used for pagination.
    • transactionType: Possible values are deposit, withdrawal, fiatBuy, fiatSell, transferIn, and transferOut. Use transferIn for Transfer In and transferOut for Transfer Out.
  • Limiter:

    • Each API endpoint has a specific Request Weight value assigned. The Request Weight value for TransferIn TransferOut is 90.

Response Example:

{
  "depositWithdrawals": [
    {
      "fiatCurrency": "TRY",
      "cryptoCurrency": "XRP",
      "fiatAmount": "1860.7754483589718693188",
      "cryptoAmount": "16.5041371610431578",
      "price": "112.746",
      "address": "",
      "orderId": "",
      "transactionId": "1016063839979168329",
      "fee": "3.10129303",
      "network": "",
      "status": "",
      "time": 1737531114760
    }
  ],
  "cursor": ""
}

Fetch Ticker

Ticker
  • Uses apiUrl(https://api.btcturk.com) as the Base Endpoint.

  • Uses /api/v2/ticker as the Endpoint.

  • Uses api/v1/btcturk/ticker as the RCXT Endpoint.

  • Only the symbol query parameter is taken (e.g. BTCUSDT):

    • symbol: Specifies the trading pair symbol.
  • Limiter:

    • Each API endpoint has a specific Request Weight value assigned. The Request Weight value for Ticker is 600.

Response Example:

{
  "symbol": "BTCUSDT",
  "price": "104562.53000000"
}