NAV Navbar

Information

{
  "code": 20001,
  "msg": "Invalid API key or secret."
}

Limits

Security

A signed endpoint require signature parameter

Endpoints use HMAC SHA256 signatures. Use your apiSecret as the key and all parameters signed.

A signed endpoint require timestamp parameter.

An additional parameter windowSize, IF sent to specify the number of milliseconds after timestamp the request is valid for. If windowSize is not sent, it defaults to 10000.

serverTime and timestamp parameter difference bigger than windowSize the request is invalid.

let windowSize = 10000;
if (serverTime - timestamp <= windowSize) {
  //accept request
} else {
  // reject request with code: "20004"
}

a signed request request example is as follows:

Key Value
apiKey Y0AhbfGmVA8FG7kPN6a9PB7UOpwnlvKG4bI5Jc57awpKv4uKN9UX114EPRTcKuhX
apiSecret 7v5TnUBX92lgKWlODJbRn3FIoriHNihB3PHFi591Do5ip9DLrCvx0bn9dHZKFZRS

[linux]$ date +%s" 1578398112

[linux]$ echo -n "timestamp=1578398112000" | openssl dgst -sha256 -hmac "7v5TnUBX92lgKWlODJbRn3FIoriHNihB3PHFi591Do5ip9DLrCvx0bn9dHZKFZRS" (stdin)= c9445c8f619a64524d58378dbc40d9bfa5148de895cd8c7df8ae769630c5b67c

[linux]$ curl -H "X-APNK-APIKEY: Y0AhbfGmVA8FG7kPN6a9PB7UOpwnlvKG4bI5Jc57awpKv4uKN9UX114EPRTcKuhX" -X POST "https://api.narkasa.com/v3/api/auth-api-test?timestamp=1578398112000&windowSize=1000&signature=c9445c8f619a64524d58378dbc40d9bfa5148de895cd8c7df8ae769630c5b67c"

{
    //Response
    "code":"00000"
}

General Endpoints

Connectivity Test

Connectivity test to the REST API.

GET

NONE

v3/api/ping

{
    //Response
    "code":"00000",
    "data":"PONG"
}

curl https://api.narkasa.com/v3/api/ping

Check Server Time

Get the current server time

GET

NONE

v3/api/time

{
    //request
    "code":"00000",
    "data":1578405048608
}

API Authentication Test

API Authentication test method.

POST

Parameter Type Required Description
x-apnk-apikey STRING YES Private API key
Must be Request Header
timestamp LONG YES Request datetime timestamp(ms)
signature STRING YES Request hashed signature with API secret
windowSize INT NO Allowable client and server time diff

v3/api/auth-api-test

{
    //Response
    "code":"00000",
}

[linux]$ curl -H "X-APNK-APIKEY: Y0AhbfGmVA8FG7kPN6a9PB7UOpwnlvKG4bI5Jc57awpKv4uKN9UX114EPRTcKuhX" -X POST "https://api.narkasa.com/v3/api/auth-api-test?timestamp=1578398112000&windowSize=1000&signature=790e8e78a273f1e755f2e07d0c10e6034b6f653daf086755d9b31f40c9bfc689"

Websocket Data Streams

Subscribe a stream

Subscription specific message for symbol

{
method: "SUBSCRIBE",
params: [ { type: "allTickers" } ]
}

{
"method":"SUBSCRIBE",
"status":"success",
"type":"allTickers"
}

Unsubscribe a stream

Unsubscription specific message for symbol

{
method: "UNSUBSCRIBE",
params: [ { type: "allTickers" } ]
}

{
"method":"UNSUBSCRIBE",
"status":"success",
"type":"allTickers"
}

Listing Subscriptions

Listing all active subscriptions

{
"method":"LIST_SUBSCRIPTIONS"
}

{
"method":"LIST_SUBSCRIPTIONS",
"status":"success",
"result":[
{ "type":"orderBook", "symbol":"BTCUSDT" },
{ "type":"depth", "symbol":"BTCUSDT" },
...
]
}

Market Endpoints

Get All Markets 24h

Get all available markets last 24h statistics

GET

NONE

v3/api/market/markets

{
    //Response
    "code":"00000",
    "markets":
    [
        {
            "symbol": "BTCTRY",
            "name": "Bitcoin",
            "firstSymbol": "BTC",
            "secondSymbol": "TRY",
            "changeAmount": 498,
            "changePercent": 0.83,
            "last": 60000,
            "firstBid": 59999,
            "firstAsk": 60001,
            "open": 59502,
            "high": 61000,
            "low": 59000,
            "avg": 60002,        
            "volume": 2,
            "openTime": 1577738760005,
            "tradeCount": 23
        }
    ]
}

curl https://api.narkasa.com/v3/api/market/markets

Code Meaning
00000 Success
90000 Unexpected Error

Get Symbol 24h Statistics

Get symbol market last 24h statistics

GET

Parameter Type Required
symbol STRING YES

v3/api/market/24h

{
    //Response
    "code": "00000",
    "market": {
        "symbol": "BTCTRY",
        "changeAmount": 498,
        "changePercent": 0.83,
        "last": 60000,
        "firstBid": 59999,
        "firstAsk": 60001,
        "open": 59502,
        "high": 61000,
        "low": 59000,
        "avg": 60002,        
        "volumeQty": 2,
        "volume": 120004,
        "openTime": 1577738760005,
        "tradeCount": 23
    }
}
Code Meaning
00000 Success
10037 Invalid symbol
90000 Unexpected Error

Get Symbol Detailed Info

Get actual order book for a symbol

GET

Parameter Type Required
symbol STRING YES

v3/api/market/info

{
    //Response
    {
        "code":"00000",
        "info":{
            "symbol":"BTCTRY",
            "firstSymbol":"BTC",
            "secondSymbol":"TRY",
            "firstSymbolMaxLength":6,
            "secondSymbolMaxLength":0,
            "minTradeTotal":10,
            "minAmount":0.000001,
            "commission":0.2,
            "enable":"true",
            "cancelEnable":"true",
            "orderEnable":"true",
            "commissionTaker":0.2,
            "commissionMaker":0.2,
            "commissionPercentage":true,
            "commissionTierBased":false,
            "precision":{
                "price":0,
                "amount":6,
                "total":0
                }
            }
        }
}
Code Meaning
00000 Success
10037 Invalid symbol
90000 Unexpected Error

Get Symbol Candlestick Data

Get selected markets candle

GET

Parameter Type Required
symbol STRING YES
startDate LONG NO
endDate LONG NO
interval STRING NO

v3/api/market/candles

{
    //Response
    "code":"00000",
    "candles":
    [
        {
            "open": 48657,
            "low": 48000,
            "high": 48999,
            "close": 48980,
            "volume": 2,
            "openTime": 1577738760005,
            "closetime": 1577738820005
        },
    ]
}

curl https://api.narkasa.com/v3/api/market/candles?symbol=BTCTRY&interval=m1

Code Meaning
00000 Success
10037 Invalid symbol
90000 Unexpected Error
m1
m3
m5
m15
m30
h1
h2
h4
d1

Get Symbol Orderbook

Get actual order book first buy and sell order for a symbol

GET

Parameter Type Required
symbol STRING YES

v3/api/market/orderbook

{
    //Response
    "code":"00000",
    "book":
    {
        "bids":
        [
            {
                "price": 47002,
                "amount": 0.0446
            }
        ],
        "asks":
        [
            {
                "price": 47003,
                "amount": 0.23
            }
        ]
    }
}

curl https://api.narkasa.com/v3/api/market/orderbook?symbol=BTCTRY

Code Meaning
00000 Success
10037 Invalid symbol
90000 Unexpected Error

Get Symbol Order Depth

Get actual order book first buy and sell order for a symbol

GET

Parameter Type Required
symbol STRING YES

v3/api/market/depth

{
    //Response
    "code":"00000",
    "book":
    {
        "bids":
        [
            {
                "price": 47002,
                "amount": 0.0446,
                "count": 4,
            },
            {
                "price": 47001,
                "amount": 0.012,
                "count": 5,
            },
            {
                "price": 47000,
                "amount": 0.012,
                "count": 2,
            }
            ...
        ],
        "asks":
        [
            {
                "price": 47003,
                "amount": 0.23,
                "count": 2,
            },
            {
                "price": 47004,
                "amount": 0.0123,
                "count": 2,
            }{
                "price": 47005,
                "amount": 0.017,
                "count": 2,
            }
            ...
        ]
    }
}
Code Meaning
00000 Success
10037 Invalid symbol
90000 Unexpected Error

Get Symbol Trade History

Get last trades for a symbol

GET

Parameter Type Required
symbol STRING YES

v3/api/market/trades

{
    //Response
    "code":"00000",
    "trades":
    [
        {
            "price": 47003,
            "amount": 0.23,
            "time": 1577891201415,
            "type": 0 //BUYER IS MAKER
        }
    ]
}

curl https://api.narkasa.com/v3/api/market/trades?symbol=BTCTRY

Code Meaning
00000 Success
10037 Invalid symbol
90000 Unexpected Error

Market Data Streams

All Tickers 24H Statistics

Handling all market updates with 24h statistics, you can subscribe allTickers channel.

{
method: "SUBSCRIBE",
params: [ { type: "allTickers" } ]
}

{
"method":"SUBSCRIBE",
"status":"success",
"type":"allTickers"
}

{
    //Example allTickers payload
    "type":"allTickers",
    "symbol":"BTCTRY",
    "changeAmount":1,
    "changePercent":0.0018,
    "firstBid":54500,
    "firstAsk":54501,
    "open":54500,
    "high":54501,
    "low":54500,
    "avg":54500.5,
    "last":54501,
    "volume":54501,
    "volumeQty":1,
    "openTime":1587923986290,
    "tradeCount":2
}

Market 24H Statistics

Handling specific market updates with 24h statistics, you can subscribe ticker channel.

{
method: "SUBSCRIBE",
params: [ { type: "ticker", symbol: "BTCTRY" } ]
}

{
"method":"SUBSCRIBE",
"status":"success",
"type":"ticker",
"symbol":"BTCTRY"
}

{
    //Example allTickers payload
    "type":"ticker",
    "symbol":"BTCTRY",
    "changeAmount":0,
    "firstBid":54500,
    "firstAsk":54501,
    "open":54500,
    "high":54500,
    "low":54500,
    "avg":54500,
    "last":54500,
    "volume":54500,
    "volumeQty":1,
    "tradeCount":1
}

Market Candlestick Updates

Handling market candlestick updates, you can subscribe candles channel for a specific market.

{
method: "SUBSCRIBE",
params: [ { type: "candles",symbol: "BTCTRY","interval": "m5" } ]
}

{
"method":"SUBSCRIBE",
"status":"success",
"type":"candles",
"symbol":"BTCTRY",
"interval":"m5",
}

m1
m3
m5
m15
m30
h1
h2
h4
d1
{
    //Example candles payload
    "type":"candles",
    "symbol":"BTCTRY",
    "interval":"m5",
    "kline":{
        "openTime":1588010100000,
        "open":54500,
        "low":54500,
        "high":54500,
        "close":54500,
        "volume":0.0005,
        "closeTime":1588010323000
    }
}

Market Order Book Updates

Handling market first buy and sell price/amount updates, you can subscribe orderBook channel for a specific market.

{
method: "SUBSCRIBE",
params: [ { type: "orderBook",symbol: "BTCTRY" } ]
}

{
"method":"SUBSCRIBE",
"status":"success",
"type":"orderBook",
"symbol":"BTCTRY",
}

{
    //Example orderBook payload
    "type":"orderBook",
    "symbol":"BTCTRY",
    "bidPrice":54500,
    "bidAmount":0.001,
    "askPrice":54501,
    "askAmount":0.001
}

Market Depth Updates

Handling market depth updates, you can subscribe depth channel for a specific market.

{
method: "SUBSCRIBE",
params: [ { type: "depth",symbol: "BTCTRY" } ]
}

{
"method":"SUBSCRIBE",
"status":"success",
"type":"depth",
"symbol":"BTCTRY",
}

{
    //Example depth payload
    "type":"depth",
    "symbol":"BTCTRY",
    "depth":{
        "bids":[
            {"price":54500,"amount":0.001,"count":1},
            {"price":54499,"amount":0.001,"count":1},
            {"price":54498,"amount":0.001,"count":1}
            ...],
        "asks":[
            {"price":54501,"amount":0.001,"count":1},
            {"price":54502,"amount":0.001,"count":1},
            {"price":54503,"amount":0.001,"count":1}
            ...]
        }
}

Market Trade Updates

Handling specific market trades, you can subscribe trade channel.

{
method: "SUBSCRIBE",
params: [ { type: "trade", symbol: "BTCTRY" } ]
}

{
"method":"SUBSCRIBE",
"status":"success",
"type":"trade",
"symbol":"BTCTRY"
}

Value Meaning
0 Buyer is maker
1 Buyer is taker
{
    //Example allTickers payload
    "type":"trade",
    "symbol":"BTCTRY",
    "amount":0.0005,
    "price":54500,
    "tradeType":1,
    "time":1588010323279
}

Signed Market Endpoints

New Limit Buy Order

Create new limit buy order

POST

Parameter Type Required
symbol STRING YES
price FLOAT YES
amount FLOAT YES

v3/api/market/limit-buy

{
    //Response
    "code": "00000",
    "order":{
        "status": "NEW",
        "orderId": "ce82ac3aed3e8b1cecc6fcd36ddc49936866c49bfa4f4f32fbfc12a005e995c9b3b52e2b",
        "market":"BTCUSDT",
        "orderType": "LIMIT",
        "side": "BUY",
        "price": 9500,
        "amount": 0.001,
        "filledAmount": 0,
        "time": 1578405048608
    }
}

Code Meaning
10010 Account not registered
10031 Insufficient balance
10037 Invalid symbol
10038 Market disabled
10039 Order total is under limit
10040 Order amount is under limit
10041 Wash trading cancelled
10062 Buy Price is not lower than %40
20000 Authorization required
20007 Price must be float and higher than 0
20009 Amount must be float and higher than 0
90000 Unexpected Error
00000 Success

New Limit Sell Order

Create new limit sell order

POST

Parameter Type Required
symbol STRING YES
price FLOAT YES
amount FLOAT YES

v3/api/market/limit-sell

{
    //Response
    "code": "00000",
    "order":{
        "status": "NEW",
        "orderId": "ce82ac3aed3e8b1cecc6fcd36ddc49936866c49bfa4f4f32fbfc12a005e995c9b3b52e2b",
        "market":"BTCUSDT",
        "orderType": "LIMIT",
        "side": "SELL",
        "price": 9500,
        "amount": 0.001,
        "filledAmount": 0,
        "time": 1578405048608
    }
}

Code Meaning
10010 Account not registered
10031 Insufficient balance
10037 Invalid symbol
10038 Market disabled
10039 Order total is under limit
10040 Order amount is under limit
10041 Wash trading cancelled
10061 Sell Price is not higher than %250
20000 Authorization required
20007 Price must be float and higher than 0
20009 Amount must be float and higher than 0
90000 Unexpected Error
00000 Success

New Market Buy Order

Create new market buy order

POST

Parameter Type Required
symbol STRING YES
amount FLOAT YES

v3/api/market/market-buy

{
    //Response
    "code": "00000",
    "order":{
        "status": "FILLED",
        "market":"BTCUSDT",
        "orderType": "MARKET",
        "side": "BUY",
        "amount": 0.001,
        "filledAmount": 0.001,
        "time": 1578405048608
    }
}

Code Meaning
10010 Account not registered
10031 Insufficient balance
10037 Invalid symbol
10038 Market disabled
10039 Order total is under limit
10040 Order amount is under limit
10041 Wash trading cancelled
10042 Market order not available
20000 Authorization required
20009 Amount must be float and higher than 0
90000 Unexpected Error
00000 Success

New Market Sell Order

Create new market sell order

POST

Parameter Type Required
symbol STRING YES
amount FLOAT YES

v3/api/market/market-sell

{
    //Response
    "code": "00000",
    "order":{
        "status": "FILLED",
        "market":"BTCUSDT",
        "orderType": "MARKET",
        "side": "SELL",
        "amount": 0.001,
        "filledAmount": 0.001,
        "time": 1578405048608
    }
}

Code Meaning
10010 Account not registered
10031 Insufficient balance
10037 Invalid symbol
10038 Market disabled
10039 Order total is under limit
10040 Order amount is under limit
10041 Wash trading cancelled
10042 Market order not available
20000 Authorization required
20009 Amount must be float and higher than 0
90000 Unexpected Error
00000 Success

New Stop Limit Buy Order

Create new stop limit buy order

POST

Parameter Type Required
symbol STRING YES
price FLOAT YES
target FLOAT YES
amount FLOAT YES

v3/api/market/stop-limit-buy

{
    //Response
    "code": "00000",
    "order":{
        "status": "NEW",
        "orderId": "ce82ac3aed3e8b1cecc6fcd36ddc49936866c49bfa4f4f32fbfc12a005e995c9b3b52e2b",
        "market":"BTCUSDT",
        "orderType": "STOP LIMIT",
        "stopType": "GREATER",
        "side": "BUY",
        "target": 9525,
        "price": 9500,
        "amount": 0.001,
        "time": 1578405048608
    }
}

Code Meaning
10010 Account not registered
10031 Insufficient balance
10037 Invalid symbol
10038 Market disabled
10039 Order total is under limit
10040 Order amount is under limit
10041 Wash trading cancelled
10062 Buy Price is not lower than %40
20000 Authorization required
20007 Price must be float and higher than 0
20008 Target must be float and higher than 0
20009 Amount must be float and higher than 0
90000 Unexpected Error
00000 Success

New Stop Limit Sell Order

Create new stop limit sell order

POST

Parameter Type Required
symbol STRING YES
price FLOAT YES
target FLOAT YES
amount FLOAT YES

v3/api/market/stop-limit-sell

{
    //Response
    "code": "00000",
    "order":{
        "status": "NEW",
        "orderId": "ce82ac3aed3e8b1cecc6fcd36ddc49936866c49bfa4f4f32fbfc12a005e995c9b3b52e2b",
        "market":"BTCUSDT",
        "orderType": "STOP LIMIT",
        "stopType": "LESS",
        "side": "SELL",
        "target": 9300,
        "price": 9305,
        "amount": 0.001,
        "time": 1578405048608
    }
}

Code Meaning
10010 Account not registered
10031 Insufficient balance
10037 Invalid symbol
10038 Market disabled
10039 Order total is under limit
10040 Order amount is under limit
10041 Wash trading cancelled
10061 Sell Price is not higher than %250
20000 Authorization required
20007 Price must be float and higher than 0
20008 Target must be float and higher than 0
20009 Amount must be float and higher than 0
90000 Unexpected Error
00000 Success

New Fast Buy Order

Create new fast buy order

POST

Parameter Type Required
symbol STRING YES
total FLOAT YES

v3/api/market/fast-buy

{
    //Response
    "code": "00000",
    "order":{
        "status": "FILLED",
        "market":"BTCUSDT",
        "orderType": "FAST",
        "side": "BUY",
        "total": 100,
        "filledTotal": 100,
        "time": 1578405048608
    }
}

Code Meaning
10010 Account not registered
10031 Insufficient balance
10037 Invalid symbol
10038 Market disabled
10039 Order total is under limit
10040 Order amount is under limit
10041 Wash trading cancelled
10060 Fast order not available
20000 Authorization required
20012 Total must be float and higher than 0
90000 Unexpected Error
00000 Success

New Fast Sell Order

Create new fast sell order

POST

Parameter Type Required
symbol STRING YES
amount FLOAT YES

v3/api/market/fast-sell

{
    //Response
    "code": "00000",
    "order":{
        "status": "FILLED",
        "market":"BTCUSDT",
        "orderType": "FAST",
        "side": "SELL",
        "amount": 0.001,
        "filledAmount": 0.001,
        "time": 1578405048608
    }
}

Code Meaning
10010 Account not registered
10031 Insufficient balance
10037 Invalid symbol
10038 Market disabled
10039 Order total is under limit
10040 Order amount is under limit
10041 Wash trading cancelled
10060 Fast order not available
20000 Authorization required
20009 Amount must be float and higher than 0
90000 Unexpected Error
00000 Success

Get User Active Orders

Get User Active Orders

GET

NONE

v3/api/market/user-orders

{
    //Response
    "code": "00000",
    "orders": [
        {
            "market": "BTCTRY",
            "price": 47016,
            "targetPrice": 0,
            "amount": 0.42,
            "filledAmount": 0,
            "side": 1,
            "time": 1580131799413,
            "orderType": 0,
            "orderId": "ce82ac3aed3e8b1cecc6fcd36ddc49936866c49bfa4f4f32fbfc12a005e995c9b3b52e2b"
        }
    ]
}

Value Meaning
0 Buy
1 Sell
Value Meaning
0 Limit
1 Market
2 Stop Loss
3 Fast
Value Meaning
0 Less
1 Greater
Code Meaning
10010 Account not registered
10038 Market disabled
20000 Authorization required
90000 Unexpected Error
00000 Success

Cancel An Active Order

Cancel An Active Order

POST

Parameter Type Required
orderId STRING YES

v3/api/market/cancel-order

{
    //Response
    "code":"00000"
}

Code Meaning
10010 Account not registered
10075 Order not found
20000 Authorization required
90000 Unexpected Error
00000 Success

Get User Trades

Get User Trade History

GET

NONE

v3/api/market/user-trades

{
    //Response
    "code": "00000",
    "trades": [ 
        {
            symbol: "BTCUSDT",
            price: 9800,
            amount: 0.0012,
            side: 1,
            orderType: 0
            commission: 0.02352
            commissionSymbol: "USDT"
            time: 1591875237869
        }
    ]
}

Value Meaning
0 Buy
1 Sell
Value Meaning
0 Limit
1 Market
2 Stop Loss
3 Fast
Code Meaning
10010 Account not registered
10038 Market disabled
20000 Authorization required
90000 Unexpected Error
00000 Success

Signed Balance Endpoints

Get User Wallet

Get User Wallet

GET

v3/api/balance/wallet

{
    //Response
    "code": "00000",
    "wallet": [
        {
            "symbol": "TRY",
            "total": 0,
            "available": 0,
            "reserved": 0,
        }
    ]
}

Code Meaning
10010 Account not registered
20000 Authorization required
90000 Unexpected Error
00000 Success

Get All Currencies

Get all available currencies

GET

NONE

v3/api/balance/currencies

{
    //Response
    "code": "00000",
    "currencies": [
        {
            "id": "cc8dfd30b230de18ec95a88438dc49c13868c49afd484832aaae1ea70fbb92cce6b12e72",
            "symbol": "TRY",
            "name": "Türk Lirası"
        },
    ]
}

Code Meaning
10010 Account not registered
20000 Authorization required
90000 Unexpected Error
00000 Success

Get Withdraw Addresses

Get available address and nodes for a symbol

POST

Parameter Type Required
symbol STRING YES

v3/api/balance/withdraw

{
    //Response
    "code": "00000",
    "currency": {
        "id": "ce87ad6fef308b43ec95a9d73cdc49933f3bc4c3aa471f32f9a81ef206ee94cee5bd7f73",
        "symbol": "BTC",
        "name": "Bitcoin",
        "enable": true,
        "minimumWithdrawAmount": 0.0001,
        "maxLength": 8,
        "channels": [
            {
                "name": "BTC",
                "enable": false,
                "commission": 0.0005,
                "addressList": [
                    {
                        "id": "9d80ac3ae93f8e48ec9bf9826bdc49913b68c4c3aa1b4b32a9ab4af40fbc9e9de2b22b2f",
                        "name": "123123123123",
                        "address": "123123123123"
                    }
                ]
            }
        ]
    }
}

Code Meaning
10010 Account not registered
10028 Withdraw disabled
10037 Invalid symbol
20000 Authorization required
90000 Unexpected Error
00000 Success

Create Withdraw

Create new withdraw for a symbol

POST

Parameter Type Required
symbol STRING YES
amount FLOAT YES
address STRING YES
secondParameter STRING NO (Only need secondary address identifier required, like XRP, XMR etc)
node STRING YES

v3/api/balance/create-withdraw

{
    //Response
    "code": "00000"
}

Code Meaning
10010 Account not registered
10026 Identity verification required
10028 Withdraw disabled
10029 Invalid withdraw channel
10030 Amount is lower than minimum withdraw limit
10031 Insufficient balance
10035 Channel monthly limit exceeded
10037 Invalid symbol
10051 Requested action is not available for your country
10054 Step-1 verified user monthly withdraw limit exceeded
10055 Step-2 verified user monthly withdraw limit exceeded
10063 Withdraw address is not valid
10064 Extra parameter is not valid(Tag, Memo etc...)
20000 Authorization required
90000 Unexpected Error
90001 Invalid Request
00000 Success

Get Last 5 Withdraw

Get last 5 withdraw actions

GET

NONE

v3/api/balance/withdraw-history'

{
    //Response
    "code": "00000",
    "history": [
        {
            "id": "cdd0af3eee648a4eec93a88268dc49936b68c49aad4b4d32adab4fae56e6c29db1e47179",
            "symbol": "BTC",
            "maxLength": 8,
            "amount":0.00213
            "time": 1578943895994,
            "state": 13,
            "real":false,
            "information": "",
            "txid": "",
            "explorer": "https://www.blockchain.com/en/explorer"
        },
}
Value Meaning
11 Pending
13 Resuming
14 Completed
21 Pending
22 Validating
23 Resuming
24 Completed
98 Rejected
99 Cancelled
Code Meaning
10010 Account not registered
20000 Authorization required
90000 Unexpected Error
00000 Success

Get Deposit Addresses

Get available address and nodes for a symbol

POST

Parameter Type Required
symbol STRING YES

v3/api/balance/deposit

{
    //Response
    "code": "00000",
    "currency": {
        "id": "cc8dfd30b230de18ec95a88438dc49c13868c49afd484832aaae1ea70fbb92cce6b12e72",
        "symbol": "TRY",
        "name": "Türk Lirası",
        "enable": true,
        "minimumDepositAmount": 10,
        "maxLength": 2,
        "channels": [
            {
                "name": "VAKIFBANK",
                "address": "TR 34 0001 5001 5800 7308 8132 39",
                "enable": true
            }
        ]
    }
}

Code Meaning
10010 Mail not registered
10026 Identity verification required
10027 Deposit disabled
10037 Invalid symbol
10051 Requested action is not available for your country
20000 Authorization required
90000 Unexpected Error
00000 Success

Get Last 5 Deposit

Get last 5 deposit actions

GET

NONE

v3/api/balance/deposit-history'

{
    //Response
    "code": "00000",
    "history": [
        {
            "id": "cdd0af3eee648a4eec93a88268dc49936b68c49aad4b4d32adab4fae56e6c29db1e47179",
            "symbol": "BTC",
            "maxLength": 8,
            "totalConfirmation": 6,
            "activeConfirmation": 3,
            "amount":0.00213
            "time": 1578943895994,
            "state": 3,
            "real":false,
            "information": "",
            "txid": "",
            "explorer": "https://www.blockchain.com/en/explorer"
        },
}
Value Meaning
11 Pending
12 Validating
13 Resuming
14 Completed
Code Meaning
10010 Account not registered
20000 Authorization required
90000 Unexpected Error
00000 Success

User Data Streams

Binding User Data Streams

Starting User Data Stream

Parameter Type Required
apiKey STRING YES
signature STRING YES

When you generate your signature, using apiKey and apiSecret you can send USER_STREAMS request.

apiKey: Y0AhbfGmVA8FG7kPN6a9PB7UOpwnlvKG4bI5Jc57awpKv4uKN9UX114EPRTcKuhX
apiSecret: 7v5TnUBX92lgKWlODJbRn3FIoriHNihB3PHFi591Do5ip9DLrCvx0bn9dHZKFZRS

[linux]$ echo -n "Y0AhbfGmVA8FG7kPN6a9PB7UOpwnlvKG4bI5Jc57awpKv4uKN9UX114EPRTcKuhX" | openssl dgst -sha256 -hmac "7v5TnUBX92lgKWlODJbRn3FIoriHNihB3PHFi591Do5ip9DLrCvx0bn9dHZKFZRS"
(stdin)= d36256b4002dc7d604e739651ef8506e0fbdc9c03dffe17124f32e0c8e63ff02

{
"method": "USER_STREAMS",
"signature": "d36256b4002dc7d604e739651ef8506e0fbdc9c03dffe17124f32e0c8e63ff02",
"apiKey": "Y0AhbfGmVA8FG7kPN6a9PB7UOpwnlvKG4bI5Jc57awpKv4uKN9UX114EPRTcKuhX"
}

{
"method":"USER_STREAMS",
"status":"success"
}

{
"method":"USER_STREAMS",
"status":"failed",
"message":"Unauthorized Access"
}

User Available Balance Update

{
    //Example balanceUpdate payload
    "type":"balanceUpdate",
    "symbol":"BTC",
    "available": 0.01245
}

User Reserved Balance Update

{
    //Example reservedUpdate payload
    "type":"reservedUpdate",
    "symbol":"BTC",
    "reserved": 0.01245
}

User Order Update Messages

{
    //Example orderUpdate payload
    "type":"orderUpdate",
    "order":{
        "status": "NEW",
        "market":"BTCUSDT",
        "orderType": 0,
        "side": 0,
        "price": 7350,
        "amount": 0.0001,
        "filledAmount": 0,
        "stopType": 0,
        "targetPrice": 0,
        "orderId": "6b11cf1414090a84bf7d6435763b92fd6a107b35cd150931af8c4d8e762e3b0b",
        "time": 1578405048608
    }
}
Value
NEW
PARTIALLY_FILLED
FILLED
CANCELLED
CANCELLED_ALL
Value Meaning
0 LIMIT ORDER
1 MARKET ORDER
2 STOP LIMIT ORDER
3 FAST ORDER
Value Meaning
0 BUY ORDER
1 SELL ORDER
Value Meaning
0 LESS THAN TARGET PRICE
1 GREATER THAN TARGET PRICE

Error Codes

Code Meaning
00000 Success
10010 Account not registered
10026 Identity verification required
10028 Withdraw disabled
10029 Invalid withdraw channel
10030 Amount is lower than minimum withdraw limit
10031 Insufficient balance
10035 Channel monthly limit exceeded
10037 Invalid symbol
10038 Market disabled
10039 Order total is under limit
10040 Order amount is under limit
10041 Wash trading cancelled
10042 Market order not available
10051 Requested action is not available for your country
10054 Step-1 verified user monthly withdraw limit exceeded
10055 Step-2 verified user monthly withdraw limit exceeded
10060 Fast order not available
10061 Sell Price is not higher than %250
10062 Buy Price is not lower than %40
20000 Authorization required
20001 Invalid API key or secret
20002 Unauthorized IP
20003 Timestamp parameter is missing
20004 Timestamp difference limit exceeded
20005 Missing parameters
20006 Invalid Symbol
20007 Price must be float and higher than 0
20008 Target must be float and higher than 0
20009 Amount must be float and higher than 0
20010 Address can not be empty
20011 API is not allowed to this action
20012 Total must be float and higher than 0
90000 Unexpected Error
90001 Invalid Request