Blockchain & Web3BtcTurk Integration
Blockchain & Web3

BtcTurk Integration

BtcTurk API client for cryptocurrency trading operations. Enables market data retrieval, order management, account info, and trade execution. Supports both public (unauthenticated) and private (authen

BtcTurk

Category: Blockchain & Web3
Provider Key: BtcTurk

BtcTurk API client for cryptocurrency trading operations. Enables market data retrieval, order management, account info, and trade execution. Supports both public (unauthenticated) and private (authenticated) endpoints.


Configuration

To use BtcTurk in your project, add it to your project integrations and provide the following configuration:

ParameterTypeRequiredDescription
apiKeystringNoBtcTurk API public key (required for private endpoints)
apiSecretstringNoBtcTurk API secret key (required for private endpoints)
baseUrlstringNoBase URL for REST API
timeoutnumberNoRequest timeout in milliseconds

Example Configuration

{
  "provider": "BtcTurk",
  "configuration": [
    { "name": "apiKey", "value": "your-apiKey" },
    { "name": "apiSecret", "value": "your-apiSecret" },
    { "name": "baseUrl", "value": "your-baseUrl" },
    { "name": "timeout", "value": 0 }
  ]
}

Available Methods

Quick reference:

  • Market: getExchangeInfo, getTicker, getOrderBook, getTrades, getKlines
  • Account: getAccountBalance, getTransactions, getFiatTransactions
  • Orders: submitOrder, cancelOrder, getOpenOrders, getOrderHistory, getOrderById
  • Trades: getTradeHistory
  • Deposits: getCryptoDepositAddresses, withdrawCrypto, getWithdrawalHistory

Market

getExchangeInfo

Get Exchange Info

Returns the exchange info including all trading pairs, currencies, and server time. Useful for discovering supported symbols and their trading rules.

Parameters:

This method takes no parameters.

MScript example:

await _BtcTurk.getExchangeInfo()

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getExchangeInfo();

getTicker

Get Ticker

Returns the current ticker information for all or a specific trading pair. Includes last price, volume, bid/ask, and 24h high/low.

Parameters:

ParameterTypeRequiredDescription
pairSymbolstringNoTrading pair symbol e.g. "BTCUSDT" (omit for all pairs)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getTickerAction",
  "provider": "BtcTurk",
  "action": "getTicker",
  "parameters": [
    { "parameterName": "pairSymbol", "parameterValue": "'your-pairSymbol'" }
  ],
  "contextPropertyName": "getTickerResult"
}

MScript example:

await _BtcTurk.getTicker({
  pairSymbol: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getTicker({
  pairSymbol: /* string */,
});

getOrderBook

Get Order Book

Returns the current order book (bids and asks) for a given trading pair.

Parameters:

ParameterTypeRequiredDescription
pairSymbolstringYesTrading pair symbol e.g. "BTCUSDT"
limitnumberNoNumber of bid/ask levels to return (max 1000)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getOrderBookAction",
  "provider": "BtcTurk",
  "action": "getOrderBook",
  "parameters": [
    { "parameterName": "pairSymbol", "parameterValue": "'your-pairSymbol'" },
    { "parameterName": "limit", "parameterValue": "0" }
  ],
  "contextPropertyName": "getOrderBookResult"
}

MScript example:

await _BtcTurk.getOrderBook({
  pairSymbol: /* string */,
  limit: /* number */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getOrderBook({
  pairSymbol: /* string */,
  limit: /* number */,
});

getTrades

Get Recent Trades

Returns the latest trades executed on the exchange for a given trading pair.

Parameters:

ParameterTypeRequiredDescription
pairSymbolstringYesTrading pair symbol e.g. "BTCUSDT"
lastnumberNoNumber of recent trades to return (max 50)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getTradesAction",
  "provider": "BtcTurk",
  "action": "getTrades",
  "parameters": [
    { "parameterName": "pairSymbol", "parameterValue": "'your-pairSymbol'" },
    { "parameterName": "last", "parameterValue": "0" }
  ],
  "contextPropertyName": "getTradesResult"
}

MScript example:

await _BtcTurk.getTrades({
  pairSymbol: /* string */,
  last: /* number */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getTrades({
  pairSymbol: /* string */,
  last: /* number */,
});

getKlines

Get Candlestick Data

Returns OHLCV (candlestick) data for a trading pair and resolution.

Parameters:

ParameterTypeRequiredDescription
symbolstringYesTrading pair symbol e.g. "BTCUSDT"
resolutionstringYesCandle resolution
fromnumberNoUnix timestamp (seconds) for start of range
tonumberNoUnix timestamp (seconds) for end of range

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getKlinesAction",
  "provider": "BtcTurk",
  "action": "getKlines",
  "parameters": [
    { "parameterName": "symbol", "parameterValue": "'your-symbol'" },
    { "parameterName": "resolution", "parameterValue": "'your-resolution'" },
    { "parameterName": "from", "parameterValue": "0" },
    { "parameterName": "to", "parameterValue": "0" }
  ],
  "contextPropertyName": "getKlinesResult"
}

MScript example:

await _BtcTurk.getKlines({
  symbol: /* string */,
  resolution: /* string */,
  from: /* number */,
  to: /* number */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getKlines({
  symbol: /* string */,
  resolution: /* string */,
  from: /* number */,
  to: /* number */,
});

Account

getAccountBalance

Get Account Balance

Returns the current balances for all assets held in the authenticated account. Includes available, total, and locked amounts per currency.

Parameters:

This method takes no parameters.

MScript example:

await _BtcTurk.getAccountBalance()

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getAccountBalance();

getTransactions

Get Transactions

Returns the full transaction/fiat transaction history of the authenticated account.

Parameters:

ParameterTypeRequiredDescription
typestringNoTransaction type filter
startTimenumberNoStart Unix timestamp in ms
endTimenumberNoEnd Unix timestamp in ms
symbolstringNoCurrency symbol filter e.g. "BTC"

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getTransactionsAction",
  "provider": "BtcTurk",
  "action": "getTransactions",
  "parameters": [
    { "parameterName": "type", "parameterValue": "'your-type'" },
    { "parameterName": "startTime", "parameterValue": "0" },
    { "parameterName": "endTime", "parameterValue": "0" },
    { "parameterName": "symbol", "parameterValue": "'your-symbol'" }
  ],
  "contextPropertyName": "getTransactionsResult"
}

MScript example:

await _BtcTurk.getTransactions({
  type: /* string */,
  startTime: /* number */,
  endTime: /* number */,
  symbol: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getTransactions({
  type: /* string */,
  startTime: /* number */,
  endTime: /* number */,
  symbol: /* string */,
});

getFiatTransactions

Get Fiat Transactions

Returns the fiat (TRY) transaction history of the authenticated account.

Parameters:

ParameterTypeRequiredDescription
startTimenumberNoStart Unix timestamp in ms
endTimenumberNoEnd Unix timestamp in ms

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getFiatTransactionsAction",
  "provider": "BtcTurk",
  "action": "getFiatTransactions",
  "parameters": [
    { "parameterName": "startTime", "parameterValue": "0" },
    { "parameterName": "endTime", "parameterValue": "0" }
  ],
  "contextPropertyName": "getFiatTransactionsResult"
}

MScript example:

await _BtcTurk.getFiatTransactions({
  startTime: /* number */,
  endTime: /* number */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getFiatTransactions({
  startTime: /* number */,
  endTime: /* number */,
});

Orders

submitOrder

Submit Order

Places a new buy or sell order on the specified trading pair. Supports market, limit, stopMarket, and stopLimit order types.

Parameters:

ParameterTypeRequiredDescription
pairSymbolstringYesTrading pair e.g. "BTCUSDT"
orderTypestringYesType of order
orderMethodstringYesBuy or sell
quantitynumberNoAmount of the base asset to trade (required for limit/stop orders)
pricenumberNoLimit price (required for limit and stopLimit orders)
stopPricenumberNoStop trigger price (required for stop orders)
newClientOrderIdstringNoCustom client-assigned order ID

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "submitOrderAction",
  "provider": "BtcTurk",
  "action": "submitOrder",
  "parameters": [
    { "parameterName": "pairSymbol", "parameterValue": "'your-pairSymbol'" },
    { "parameterName": "orderType", "parameterValue": "'your-orderType'" },
    { "parameterName": "orderMethod", "parameterValue": "'your-orderMethod'" },
    { "parameterName": "quantity", "parameterValue": "0" },
    { "parameterName": "price", "parameterValue": "0" },
    { "parameterName": "stopPrice", "parameterValue": "0" },
    { "parameterName": "newClientOrderId", "parameterValue": "'your-newClientOrderId'" }
  ],
  "contextPropertyName": "submitOrderResult"
}

MScript example:

await _BtcTurk.submitOrder({
  pairSymbol: /* string */,
  orderType: /* string */,
  orderMethod: /* string */,
  quantity: /* number */,
  price: /* number */,
  stopPrice: /* number */,
  newClientOrderId: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.submitOrder({
  pairSymbol: /* string */,
  orderType: /* string */,
  orderMethod: /* string */,
  quantity: /* number */,
  price: /* number */,
  stopPrice: /* number */,
  newClientOrderId: /* string */,
});

cancelOrder

Cancel Order

Cancels an existing open order by its order ID.

Parameters:

ParameterTypeRequiredDescription
idstringYesThe order ID to cancel

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "cancelOrderAction",
  "provider": "BtcTurk",
  "action": "cancelOrder",
  "parameters": [
    { "parameterName": "id", "parameterValue": "'your-id'" }
  ],
  "contextPropertyName": "cancelOrderResult"
}

MScript example:

await _BtcTurk.cancelOrder({
  id: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.cancelOrder({
  id: /* string */,
});

getOpenOrders

Get Open Orders

Retrieves all open orders for a trading pair or all pairs on the account.

Parameters:

ParameterTypeRequiredDescription
pairSymbolstringNoTrading pair symbol to filter by e.g. "BTCUSDT"

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getOpenOrdersAction",
  "provider": "BtcTurk",
  "action": "getOpenOrders",
  "parameters": [
    { "parameterName": "pairSymbol", "parameterValue": "'your-pairSymbol'" }
  ],
  "contextPropertyName": "getOpenOrdersResult"
}

MScript example:

await _BtcTurk.getOpenOrders({
  pairSymbol: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getOpenOrders({
  pairSymbol: /* string */,
});

getOrderHistory

Get Order History

Retrieves the order history for the authenticated account with optional filters.

Parameters:

ParameterTypeRequiredDescription
pairSymbolstringNoTrading pair symbol e.g. "BTCUSDT"
startTimenumberNoStart Unix timestamp in ms
endTimenumberNoEnd Unix timestamp in ms
pagenumberNoPage number for pagination
limitnumberNoNumber of records per page (max 100)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getOrderHistoryAction",
  "provider": "BtcTurk",
  "action": "getOrderHistory",
  "parameters": [
    { "parameterName": "pairSymbol", "parameterValue": "'your-pairSymbol'" },
    { "parameterName": "startTime", "parameterValue": "0" },
    { "parameterName": "endTime", "parameterValue": "0" },
    { "parameterName": "page", "parameterValue": "0" },
    { "parameterName": "limit", "parameterValue": "0" }
  ],
  "contextPropertyName": "getOrderHistoryResult"
}

MScript example:

await _BtcTurk.getOrderHistory({
  pairSymbol: /* string */,
  startTime: /* number */,
  endTime: /* number */,
  page: /* number */,
  limit: /* number */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getOrderHistory({
  pairSymbol: /* string */,
  startTime: /* number */,
  endTime: /* number */,
  page: /* number */,
  limit: /* number */,
});

getOrderById

Get Order By ID

Retrieves details for a specific order by its order ID.

Parameters:

ParameterTypeRequiredDescription
idstringYesThe order ID to look up

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getOrderByIdAction",
  "provider": "BtcTurk",
  "action": "getOrderById",
  "parameters": [
    { "parameterName": "id", "parameterValue": "'your-id'" }
  ],
  "contextPropertyName": "getOrderByIdResult"
}

MScript example:

await _BtcTurk.getOrderById({
  id: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getOrderById({
  id: /* string */,
});

Trades

getTradeHistory

Get Trade History

Returns the trade (fill) history for the authenticated account. Each record represents an executed trade matched from an order.

Parameters:

ParameterTypeRequiredDescription
pairSymbolstringNoTrading pair symbol e.g. "BTCUSDT"
startTimenumberNoStart Unix timestamp in ms
endTimenumberNoEnd Unix timestamp in ms
pagenumberNoPage number for pagination
limitnumberNoNumber of records per page

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getTradeHistoryAction",
  "provider": "BtcTurk",
  "action": "getTradeHistory",
  "parameters": [
    { "parameterName": "pairSymbol", "parameterValue": "'your-pairSymbol'" },
    { "parameterName": "startTime", "parameterValue": "0" },
    { "parameterName": "endTime", "parameterValue": "0" },
    { "parameterName": "page", "parameterValue": "0" },
    { "parameterName": "limit", "parameterValue": "0" }
  ],
  "contextPropertyName": "getTradeHistoryResult"
}

MScript example:

await _BtcTurk.getTradeHistory({
  pairSymbol: /* string */,
  startTime: /* number */,
  endTime: /* number */,
  page: /* number */,
  limit: /* number */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getTradeHistory({
  pairSymbol: /* string */,
  startTime: /* number */,
  endTime: /* number */,
  page: /* number */,
  limit: /* number */,
});

Deposits

getCryptoDepositAddresses

Get Crypto Deposit Addresses

Returns the list of crypto deposit addresses for the authenticated account.

Parameters:

ParameterTypeRequiredDescription
currencystringNoCurrency symbol to filter e.g. "BTC"

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getCryptoDepositAddressesAction",
  "provider": "BtcTurk",
  "action": "getCryptoDepositAddresses",
  "parameters": [
    { "parameterName": "currency", "parameterValue": "'your-currency'" }
  ],
  "contextPropertyName": "getCryptoDepositAddressesResult"
}

MScript example:

await _BtcTurk.getCryptoDepositAddresses({
  currency: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getCryptoDepositAddresses({
  currency: /* string */,
});

withdrawCrypto

Withdraw Crypto

Submits a cryptocurrency withdrawal request from the authenticated account.

Parameters:

ParameterTypeRequiredDescription
currencystringYesCurrency symbol e.g. "BTC"
addressstringYesDestination wallet address
amountnumberYesAmount to withdraw
tagstringNoOptional destination tag or memo (e.g. for XRP, XLM)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "withdrawCryptoAction",
  "provider": "BtcTurk",
  "action": "withdrawCrypto",
  "parameters": [
    { "parameterName": "currency", "parameterValue": "'your-currency'" },
    { "parameterName": "address", "parameterValue": "'your-address'" },
    { "parameterName": "amount", "parameterValue": "0" },
    { "parameterName": "tag", "parameterValue": "'your-tag'" }
  ],
  "contextPropertyName": "withdrawCryptoResult"
}

MScript example:

await _BtcTurk.withdrawCrypto({
  currency: /* string */,
  address: /* string */,
  amount: /* number */,
  tag: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.withdrawCrypto({
  currency: /* string */,
  address: /* string */,
  amount: /* number */,
  tag: /* string */,
});

getWithdrawalHistory

Get Withdrawal History

Returns crypto and fiat withdrawal history for the authenticated account.

Parameters:

ParameterTypeRequiredDescription
currencystringNoCurrency symbol filter
startTimenumberNoStart Unix timestamp in ms
endTimenumberNoEnd Unix timestamp in ms

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getWithdrawalHistoryAction",
  "provider": "BtcTurk",
  "action": "getWithdrawalHistory",
  "parameters": [
    { "parameterName": "currency", "parameterValue": "'your-currency'" },
    { "parameterName": "startTime", "parameterValue": "0" },
    { "parameterName": "endTime", "parameterValue": "0" }
  ],
  "contextPropertyName": "getWithdrawalHistoryResult"
}

MScript example:

await _BtcTurk.getWithdrawalHistory({
  currency: /* string */,
  startTime: /* number */,
  endTime: /* number */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("BtcTurk");
const result = await client.getWithdrawalHistory({
  currency: /* string */,
  startTime: /* number */,
  endTime: /* number */,
});