NAV
shell

API Reference

Introduction

Korbit provides a RESTful API for developers to: authenticate users, place orders, view filled and open orders, transfer KRW or BTC, and list all user activities including history of trades and transfers.

API call rate limit

To ensure the quality and reliability of our API service, the API calls are limited to a certain rate threshold. Creating / refreshing access token calls are limited to 60 calls per 60 minutes; Ticker calls are limited to 60 calls per 60 seconds; All other calls combined, are limited to 12 calls per 1 second.

Authentication

Implement user login to receive and refresh access tokens, which must be included in API requests for user-specific actions.

Introduction

Prior to using Korbit API, you need to authenticate a user. As Korbit API provides OAuth 2.0 interface, you get an access token after a successful authentication. For each API request, you need to set Authorization HTTP header with the access token.

API Keys and Secrets

You need to request an API key and secret to use Korbit API. All Korbit users can get the API key through the Korbit website. You can sign in into your Korbit account by direct authentication API call, which requires username and password in the body of the POST request to get an access token (and a refresh token). In this document, <CLIENT ID> denotes an API key, and <CLIENT SECRET> denotes a corresponding API secret.

Scope

Scope is used to limit the rights of each API key to specific actions

Nonce & Access Token

APIs that start with v1/user access or modify resource of a user on the server. So you need to provide an access token and nonce for each request. You can get the access token after a successful authentication. For the nonce, you can specify a monotonously increasing number to it. To allow only one client to send API requests and to process a request only once, Korbit API server processes clients’ requests only if the nonce value monotonously increases. For GET requests, you don’t need to provide a nonce. For POST requests, you can provide the nonce in the body with the other parameters.

Instead of passing username and password for each API request, you pass the access token you got after the successful authentication. Before sending the API request to the server, you need to set the Authorization HTTP header with the access token in the following format.

Bearer 12094519051ewhdsofhsoy2ghewekfhse

Because the access token is expired in an hour, you need to refresh it using the refresh token you got after the successful authentication.

Direct Authentication

Direct authentication embeds username and password in the POST body.

Request

curl -D - -X POST -d "client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&username=$EMAIL&password=$PASSWORD&grant_type=password" https://api.korbit.co.kr/v1/oauth2/access_token

Response

{
  "token_type":"Bearer",
  "access_token":"1t1LgTslDrGznxPxhYz7RldsNVIbnEK",
  "expires_in":3600,
  "refresh_token":"vn5xoOf4PzckgnqjQSL9Sb3KxWJvYtm"
}

Access Token, Refresh Token

You can get both access token and refresh token after setting grant_type with ‘password’ and specifying username and password in the body of POST request to v1/oauth2/access_token.

POST https://api.korbit.co.kr/v1/oauth2/access_token

Refreshing Access Token

Because the access token is expired within an hour, you need to refresh your access token before the expiration using the refresh token. In this case you can POST a request to v1/oauth2/access_token after setting grant_type to ‘refresh_token’.

Request

curl -D - -X POST -d "client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&refresh_token=$REFRESH_TOKEN&grant_type=refresh_token" https://api.korbit.co.kr/v1/oauth2/access_token

Response

{
  "token_type":"Bearer",
  "access_token":"IuqEWTK09eCLThRCZZSALA0oXC8EI7s",
  "expires_in":3600,
  "refresh_token":"vn5xoOf4Pzckgn4jQSL9Sb3KxWJvYtm"
}

Getting User Information

Request

curl -D - -H "Authorization: Bearer $ACCESS_TOKEN" https://api.korbit.co.kr/v1/user/info

Response

{
  "email": "gildong@gmail.com",
  "nameCheckedAt": 1387318392000,
  "name": "홍길동",
  "phone": "010-1234-1234",
  "birthday": "1988-01-01",
  "gender": "m",
  "prefs":{
    "notifyTrades": true,
    "notifyDepositWithdrawal": true
  },
  "userLevel": "3"
}

You can get information of a user by using the following request.

ATTRIBUTES

Name Description
email The email address registered in Korbit
nameCheckedAt The timestamp of user name validation. If this field is not included in the response, it means that the user did not go through the user name validation process.
name The name of the user
phone The phone number of the user
birthday The birthday of the user
gender The gender of the user. m: male, f: female
prefs.notifyDepositWithdrawal The user preference whether to receive an email for successful withdrawal and deposit of KRW
prefs.notifyTrades The user preference whether to receive successful fills of orders
userLevel User’s membership tier

OAuth 2.0 References

The Korbit API complies with the OAuth 2.0 specification. The following are some OAuth 2.0 resources.

Explanation of OAuth 2.0

Explanation of OAuth 2.0 Video 1

Explanation of OAuth 2.0 Video 2

Explanation of OAuth 2.0 Video 3

Explanation of OAuth 2.0 Video 4

Using OAuth2.0 as a web service consumer

(Google) OAuth 2.0 Overview

(Google) Example of OAuth 2.0 in a mobile app

Using OAuth2.0 as a web service provider

(Book) Getting Started with OAuth 2.0 - Ryan Boyd

(Google I/O 2012) OAuth 2.0 for Identity and Data Access - Ryan Boyd

Exchange: Public

Check the current status of the market by listing open and filled orders.

Ticker

Request

curl -D - "https://api.korbit.co.kr/v1/ticker?currency_pair=$CURRENCY_PAIR"

Response

{
  "timestamp": 1389678052000,
  "last": "569000"
}

HTTP REQUEST

GET https://api.korbit.co.kr/v1/ticker

PARAMETERS

Parameter Default Description
currency_pair btc_krw The type of trading currency of which information you want to query for. Bitcoin trading is default.
you can also specify “etc_krw” for Ethereum Classic trading, “eth_krw” for Ethereum trading, “xrp_krw” for Ripple trading, “bch_krw” for Bitcoin Cash trading and “ltc_krw” for Litecoin trading. Coins other than BTC, ETC, ETH, XRP, BCH, LTC are not supported yet.

ATTRIBUTES

Name Description
timestamp Unix timestamp in milliseconds of the last filled order.
last Price of the last filled order.

Detailed Ticker

Request

curl -D - "https://api.korbit.co.kr/v1/ticker/detailed?currency_pair=$CURRENCY_PAIR"

Response

{
  "timestamp": 1394590350000,
  "last": "663699",
  "bid": "660001",
  "ask": "663699",
  "low": "642000",
  "high": "663699",
  "volume": "52.50203662"
}

HTTP REQUEST

GET https://api.korbit.co.kr/v1/ticker/detailed

PARAMETERS

Parameter Default Description
currency_pair btc_krw The type of trading currency of which information you want to query for. Bitcoin trading is default.
you can also specify “etc_krw” for Ethereum Classic trading, “eth_krw” for Ethereum trading, “xrp_krw” for Ripple trading, “bch_krw” for Bitcoin Cash trading and “ltc_krw” for Litecoin trading. Coins other than BTC, ETC, ETH, XRP, BCH, LTC are not supported yet.

ATTRIBUTES

Name Description
timestamp Unix timestamp in milliseconds of the last filled order.
last Price of the last filled order.
bid Best bid price.
ask Best ask price.
low Lowest price within the last 24 hours.
high Highest price within the last 24 hours.
volume Transaction volume within the last 24 hours.

Orderbook

Request

curl -D - "https://api.korbit.co.kr/v1/orderbook?currency_pair=$CURRENCY_PAIR"

Response

{
  "timestamp" : 1386135077000,
  "bids" : [["1100000", "0.0103918", "1"], ["1000000", "0.01000000", "1"], ... ],
  "asks" : [["569000", "0.50000000", "1"], ["568500", "2.00000000", "1"], ... ]
}

HTTP REQUEST

GET https://api.korbit.co.kr/v1/orderbook

PARAMETERS

Parameter Default Description
currency_pair btc_krw The type of trading currency of which information you want to query for. Bitcoin trading is default.
you can also specify “etc_krw” for Ethereum Classic trading, “eth_krw” for Ethereum trading, “xrp_krw” for Ripple trading, “bch_krw” for Bitcoin Cash trading and “ltc_krw” for Litecoin trading. Coins other than BTC, ETC, ETH, XRP, BCH, LTC are not supported yet.

ATTRIBUTES

Name Description
timestamp Unix timestamp in milliseconds of the last placed order.
asks An array containing a list of ask prices. Each order has two elements: price and the unfilled amount. The third element is deprecated and is always 1.
bids An array containing a list of bid prices. Each order has two elements: price and the unfilled amount. The third element is deprecated and is always 1.

List of Filled Orders

Request

curl -D - "https://api.korbit.co.kr/v1/transactions?currency_pair=$CURRENCY_PAIR"

Response

[
  {"timestamp" : 1389678052000, "tid" : "22546", "price" : "569000", "amount" : "0.01000000"},
  {"timestamp" : 1389678017000, "tid" : "22545", "price" : "580000", "amount" : "0.01000000"},
  {"timestamp" : 1389462921000, "tid" : "22544", "price" : "569000", "amount" : "0.16348000"},
  {"timestamp" : 1389462921000, "tid" : "22543", "price" : "570000", "amount" : "0.20000000"},
  {"timestamp" : 1389462920000, "tid" : "22542", "price" : "578000", "amount" : "0.33652000"},
  ...
]

HTTP REQUEST

GET https://api.korbit.co.kr/v1/transactions

PARAMETERS

Parameter Default Description
currency_pair btc_krw The type of trading currency of which information you want to query for. Bitcoin trading is default.
you can also specify “etc_krw” for Ethereum Classic trading, “eth_krw” for Ethereum trading, “xrp_krw” for Ripple trading, “bch_krw” for Bitcoin Cash trading and “ltc_krw” for Litecoin trading. Coins other than BTC, ETC, ETH, XRP, BCH, LTC are not supported yet.
time hour The time period you want to query. If this parameter is specified as minute, it queries data within the last minute, hour means the last hour, day means the last 24 hours.

ATTRIBUTES

Name Description
timestamp Timestamp of last filled order.
tid Unique ID that identifies the transaction.
price Transaction price in KRW.
amount Transaction amount in BTC.

Constants

Request

curl -D - "https://api.korbit.co.kr/v1/constants"

Response

{
  "exchange": {
    "btc_krw": {
      "tick_size": 500,
      "min_price": 1000,
      "max_price": 100000000,
      "order_min_size": 0.00100000,
      "order_max_size": 100.00000000
    },
    "eth_krw": {
      "tick_size": 50,
      "min_price": 1000,
      "max_price": 100000000,
      "order_min_size": 0.01000000,
      "order_max_size": 1000.00000000
    },
    ...
  }
}

You can get constant values such as fee rates and minimum amount of BTC to trade, etc.

HTTP REQUEST

GET https://api.korbit.co.kr/v1/constants

ATTRIBUTES

Name Description
exchange Exchange constants
currency_pair The type of trading currency pair of Exchange. (btc_krw, eth_krw, …)
tick_size order unit size.
min_price Minimum price for an order.
max_price Maximum price for an order.
order_min_size Minimum amount for placing an order.
order_max_size Maximum amount for placing an order.

Exchange: User

Place an exchange order. List user’s open and filled orders.

Place a Bid Order

Request

curl -D - -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -d "currency_pair=$CURRENCY_PAIR&type=$TYPE&price=$PRICE&coin_amount=$COIN_AMOUNT&nonce=$NONCE" https://api.korbit.co.kr/v1/user/orders/buy

Response

{
  "orderId":"58738",
  "status":"success",
  "currency_pair":"btc_krw"
}

POST https://api.korbit.co.kr/v1/user/orders/buy

PARAMETERS

Parameter Description
currency_pair The type of trading currency of which information you want to query for. Bitcoin trading is default.
you can also specify “etc_krw” for Ethereum Classic trading, “eth_krw” for Ethereum trading, “xrp_krw” for Ripple trading, “bch_krw” for Bitcoin Cash trading and “ltc_krw” for Litecoin trading. Coins other than BTC, ETC, ETH, XRP, BCH, LTC are not supported yet.
type The type of order. Specify ‘limit’ to place an order with a specific price you want. Specify 'market’ to place an order to fill with the market price.
price The price of BTC in KRW. This value needs to be in increments of 500 KRW. This parameter is valid only for 'limit’ order. you can also specify ETH price in increments of 50 KRW, and ETC price in increments of 10 KRW.
coin_amount The amount of trading currency you want to buy. When the order type is 'limit’ order, it will place a buy order with a price specified in the 'price’ parameter. When the order type is ‘market’ order, 'price’ and 'coin_amount’ parameters should not be used.
fiat_amount The amount of KRW you want to spend to buy the trading currency at market price. This parameter is only valid when the order type is 'market’ order; When placing market bid orders, 'fiat_amount’ should be used instead of 'price’ and 'coin_amount’ parameters.

ATTRIBUTES

Name Description
orderId After a successful placement of order, you get the ID of the one you placed.
status 'success’ if it was successful. An error symbol shown below if any error happened.
currency_pair The type of currency that the order was processed in.

Error Symbols

Error Name Description
name_unchecked In case the user who did not run the name validation process by using a cell phone in Korea.
under_age In case the user is under 19 years of age and places a buy order.
not_enough_krw In case the user does not have enough KRW balance in the wallet to place the bidding order.
too_many_orders In case the maximum number of orders limit hit.
save_failure This is an internal error. Usually it should not happen.

Place an Ask Order

Request

curl -D - -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -d "currency_pair=$CURRENCY_PAIR&type=$TYPE&price=$PRICE&coin_amount=$COIN_AMOUNT&nonce=$NONCE" https://api.korbit.co.kr/v1/user/orders/sell

Response

{
  "orderId":"12513",
  "status":"success",
  "currency_pair":"btc_krw"
}

POST https://api.korbit.co.kr/v1/user/orders/sell

PARAMETERS

Parameter Description
currency_pair The type of trading currency of which information you want to query for. Bitcoin trading is default.
you can also specify “etc_krw” for Ethereum Classic trading, “eth_krw” for Ethereum trading, “xrp_krw” for Ripple trading, “bch_krw” for Bitcoin Cash trading and “ltc_krw” for Litecoin trading. Coins other than BTC, ETC, ETH, XRP, BCH, LTC are not supported yet.
type The type of order. Specify 'limit’ to place an order with a specific price you want. Specify 'market’ to place an order to fill with the market price.
price The price of BTC in KRW. This value needs to be in increments of 500 KRW. This parameter is valid only for 'limit’ order. you can also specify ETH price in increments of 50 KRW, and ETC price in increments of 10 KRW.
coin_amount The amount of the trading currency you want to sell. When the order type is 'limit’ order, it will place a sell order with the specified price in the 'price’ parameter. When the order type is 'market’ order, 'price’ parameter should not be used.

ATTRIBUTES

Name Description
orderId After a successful placement of order, you get the ID of the one you placed.
status 'success’ if it was successful. An error symbol shown below if any error happened.
currency_pair The type of currency that the order was processed in.

Error Symbols

Error Name Description
name_unchecked In case the user who did not run the name validation process by using a cell phone in Korea.
under_age In case the user is under 19 years of age and places a buy order.
not_enough_btc In case the user does not have enough BTC balance in the wallet to place the ask order.
too_many_orders In case the maximum number of orders limit hit.
save_failure This is an internal error. Usually it should not happen.

Cancel Open Orders

Request

curl -D - -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -d "currency_pair=$CURRENCY_PAIR&id=$ID&nonce=$NONCE" https://api.korbit.co.kr/v1/user/orders/cancel

Response : For each order, you have a status. The following example response shows that the cancellation of the orders with ID 1000 and 1002 were successful, but the cancellation of the order with ID 1001 was failed because that order does not exist.

[
  {"orderId":"1000","status":"success"},
  {"orderId":"1001","status":"not_found"},
  {"orderId":"1002","status":"success"}
]

POST https://api.korbit.co.kr/v1/user/orders/cancel

id=1000&id=1001&id=1002

PARAMETERS

Parameter Description
currency_pair The type of trading currency of which information you want to query for. Bitcoin trading is default.
you can also specify “etc_krw” for Ethereum Classic trading, “eth_krw” for Ethereum trading, “xrp_krw” for Ripple trading, “bch_krw” for Bitcoin Cash trading and “ltc_krw” for Litecoin trading. Coins other than BTC, ETC, ETH, XRP, BCH, LTC are not supported yet.
id The ID of order to cancel. You can repeat this parameter to cancel multiple orders at the same time, such as id=1000&id=1002. The ID of order is the id field on the response of v1/user/orders/open, or orderId field on the response of v1/user/orders/buy and v1/user/orders/sell.

ATTRIBUTES

Name Description
orderId The ID of order that were passed to the 'id’ parameter.
status 'success’ if the order was successfully canceled. An error symbol shown below otherwise.

Error Symbols

Error Name Description
under_age The user is under 19 years of age and cancels an order.
not_found The order does not exist. This happens if you specify an ID that does not exist.
not_authorized You tried to cancel an order placed by another user.
already_filled The order was fully filled, without any remaining amount before the trial to cancel it.
partially_filled By the time you send this request, the order was not filled at all. However, the order was partially filled, with remaining amount while you request to cancel it.
already_canceled The order is already canceled.

List Open Orders

Request

curl -D - -H "Authorization: Bearer $ACCESS_TOKEN" https://api.korbit.co.kr/v1/user/orders/open?currency_pair=$CURRENCY_PAIR

Response

[
  {"timestamp":1389173297000,"id":"58726","type":"ask","price":{"currency":"krw","value":"800000"},
  "total":{"currency":"btc","value":"1.00000000"},"open":{"currency":"btc","value":"0.75000000"}},
  {"timestamp":1386419377000,"id":"37499","type":"bid","price":{"currency":"krw","value":"700000"},
  "total":{"currency":"btc","value":"1.50000000"},"open":{"currency":"btc","value":"0.41200000"}},
  {"timestamp":1386419089000,"id":"37476","type":"bid","price":{"currency":"krw","value":"10090"},
  "total":{"currency":"btc","value":"24.00000000"},"open":{"currency":"btc","value":"24.00000000"}},
  {"timestamp":1386419024000,"id":"37468","type":"bid","price":{"currency":"krw","value":"400001"},
  "total":{"currency":"btc","value":"1.50000000"},"open":{"currency":"btc","value":"1.50000000"}},
  {"timestamp":1386418990000,"id":"37464","type":"bid","price":{"currency":"krw","value":"130001"},
  "total":{"currency":"btc","value":"7.00000000"},"open":{"currency":"btc","value":"7.00000000"}},
  {"timestamp":1386418700000,"id":"37432","type":"bid","price":{"currency":"krw","value":"1001"},
  "total":{"currency":"btc","value":"240.00000000"},"open":{"currency":"btc","value":"240.00000000"}},
  {"timestamp":1386418647000,"id":"37423","type":"bid","price":{"currency":"krw","value":"300001"},
  "total":{"currency":"btc","value":"5.00000000"},"open":{"currency":"btc","value":"5.00000000"}},
  {"timestamp":1386405575000,"id":"36605","type":"ask","price":{"currency":"krw","value":"1450000"},
  "total":{"currency":"btc","value":"0.50000000"},"open":{"currency":"btc","value":"0.50000000"}}
]

GET https://api.korbit.co.kr/v1/user/orders/open

PARAMETERS

Parameter Description
currency_pair The type of trading currency of which information you want to query for. Bitcoin trading is default.
you can also specify “etc_krw” for Ethereum Classic trading, “eth_krw” for Ethereum trading, “xrp_krw” for Ripple trading, “bch_krw” for Bitcoin Cash trading and “ltc_krw” for Litecoin trading. Coins other than BTC, ETC, ETH, XRP, BCH, LTC are not supported yet.
offset/limit Offset and limit for pagination of the orders. You can specify the 'offset’, which is 0-based, to get list of orders starting from the offset. You can also provide the 'limit’ to specify the number of open orders you want to get. The default value of 'offset’ is 0 and 'limit’ is 10.

ATTRIBUTES

Name Description
timestamp Unix timestamp in milliseconds by the time the order was placed.
id The unique identifier of the order.
type The type of order. 'bid’ for the bid orders, 'ask’ for the ask orders.
price The price of BTC in KRW is set to price.value. Currently it comes with an additional currency field, but it is always set to 'krw’.
total The amount of BTC in your initial order. You have two sub-fields under this field. One is 'currency’, which is always set to 'btc’, another is 'value’, which is set to the amount of BTC.
open The amount of BTC that are not filled yet. You have two sub-fields under this field. One is 'currency’, which is always set to 'btc’, another is 'value’, which is set to the amount of BTC.

View Exchange Orders

Request

curl -D - -H "Authorization: Bearer $ACCESS_TOKEN" https://api.korbit.co.kr/v1/user/orders

Response

[
  {
    "id": "89999",
    "currency_pair": "btc_krw",
    "side": "bid",
    "avg_price": "2900000",
    "price": "3000000",
    "order_amount": "0.81140000",
    "filled_amount": "0.33122200",
    "order_total": "2434200",
    "filled_total": "960543",
    "created_at": "1500033942638",
    "last_filled_at": "1500533946947",
    "status": "partially_filled",
    "fee": "0.00000500"
  },
  {
    "id": "90002",
    "currency_pair": "btc_krw",
    "side": "ask",
    "avg_price": "0",
    "price": "5000000",
    "order_amount": "0.71140000",
    "filled_amount": "0",
    "order_total": "3557000",
    "filled_total": "0",
    "created_at": "1500533946947",
    "status": "unfilled"
  },
  {
    "id": "90003",
    "currency_pair": "btc_krw",
    "side": "bid",
    "avg_price": "3000000",
    "price": "3000000",
    "order_amount": "0.81140000",
    "filled_amount": "0.81140000",
    "order_total": "2434200",
    "filled_total": "2434200",
    "created_at": 1400533933748,
    "last_filled_at": "1500510381038",
    "status": "filled",
    "fee": "0.00001000"
  },
  {
    "id": "90004",
    "currency_pair": "btc_krw",
    "side": "ask",
    "avg_price": "2837390",
    "price": "0",
    "order_amount": "0.71140000",
    "filled_amount": "0.71140000",
    "filled_total": "2018519",
    "created_at": "1400533946947",
    "last_filled_at": "1500533946947",
    "status": "filled",
    "fee": "330"
  }
]

GET https://api.korbit.co.kr/v1/user/orders

PARAMETERS

Parameter Description
currency_pair The type of trading currency of which information you want to query for. Bitcoin trading is default.
you can also specify “etc_krw” for Ethereum Classic trading, “eth_krw” for Ethereum trading, “xrp_krw” for Ripple trading, “bch_krw” for Bitcoin Cash trading and “ltc_krw” for Litecoin trading. Coins other than BTC, ETC, ETH, XRP, BCH, LTC are not supported yet.
status Optional parameter for filtering by order status. Default is all statuses. Order status can be one of the following: 'unfilled’, 'partially_filled’, or 'filled’. These parameters can be chained in order to query for multiple status, for instance, status=unfilled&status=partially_filled to get all open orders.
id Optional parameter for querying by order id. Default is all ids. ID query can be chained in order to query for multiple IDs, for instance, id=93038&id=93484
offset Optional parameter for pagination. You can get the list of transactions starting from the 0-based offset index. Default is 0.
limit Optional parameter for pagination. You can set the maximum number of transactions you want to get with this parameter. Default is 40.

ATTRIBUTES

Name Description
id The unique identifier of the order.
currency_pair The type of currency that the order was processed in.
side The type of the order. 'bid’ for bid orders, 'ask’ for ask orders.
avg_price The weighted average of the price the currency was traded at.
price The price that the user has set the limit to. 0 if the order was a market order.
order_amount The amount of the trading currency you ordered. Both in bid(i.e. KRW => BTC) and ask(i.e. BTC => KRW) orders, the amount is displayed in the non-fiat currency(i.e. BTC).
filled_amount The amount of the trading currency that has been partially filled. When filledAmount is equal to orderAmount, the order is complete. Shows only if limit trade.
order_total The total amount of the placed order, described in KRW. If the order is a market ask order, this field is not included in the response.
filled_total The filled amount of the order, described in KRW.
created_at Unix timestamp in milliseconds by the time the order was placed.
last_filled_at Unix timestamp in milliseconds when the order was last filled, either partially or fully. Does not show if not filled at all.
status Current status of the order. Can be one of the following: 'unfilled’, 'partially_filled’, or 'filled’.
fee The amount of the fee charged. The fee is charged at the quote currency. When the order is a bid order(i.e. KRW => BTC), the fee is charged in BTC. When the order is an ask order(i.e. BTC => KRW), the fee is charged in KRW. Doesn’t show up if the order is unfilled at all.

View Transfers

Request

curl -D - -H "Authorization: Bearer $ACCESS_TOKEN" https://api.korbit.co.kr/v1/user/transfers

Response

[
  {
    "id": "270",
    "type": "deposit",
    "currency": "btc",
    "amount": "0.81140000",
    "completed_at": 11750020020,
    "updated_at": 11550050080,
    "created_at": 11550020020,
    "status": "filled",
    "details": {
      "transaction_id": "2d84855aa9c...",
      "address": "1F1zAaz5x1HUXrCNLbtMDqcw6o5GNx4xqX"
    }
  },
  {
    "id": "280",
    "type": "withdrawal",
    "currency": "btc",
    "amount": "0.81140000",
    "updated_at": 11550050080,
    "created_at": 11550020020,
    "status": "requested",
    "details": {
      "transaction_id": "2d84855aa9c...",
      "address": "1F1zAaz5x1HUXrCNLbtMDqcw6o5GNx4xqX"
    }
  },
  {
    "id": "380",
    "type": "deposit",
    "currency": "krw",
    "amount": "1100000",
    "completed_at": 12550020020,
    "updated_at": 11550020020,
    "created_at": 11233223233,
    "status": "filled",
    "details": {
      "bank": "우리은행",
      "account_number": "1233244234",
      "owner": "(주)코빗"
    }
  },
  {
    "id": "480",
    "timestamp": 12983983983,
    "type": "withdrawal",
    "currency": "krw",
    "amount": "1200000",
    "completed_at": 12550020020,
    "updated_at": 11550020020,
    "created_at": 11233223233,
    "status": "filled",
    "fee": "1800",
    "details": {
      "bank": "신한은행",
      "account_number": "32329832899",
      "owner": "홍길동"
    }
  }
]

GET https://api.korbit.co.kr/v1/user/transfers

PARAMETERS

Parameter Description
currency The type of currency you want to query for. Supports KRW, BTC, ETH, ETC, and XRP.
type Optional parameter for filtering. You can filter by type of transfer, which is either 'deposit’ or 'withdrawal’. Default is 'all’ transfers.
offset Optional parameter for pagination. You can get the list of transactions starting from the 0-based offset index. Default is 0.
limit Optional parameter for pagination. You can set the maximum number of transactions you want to get with this parameter. Default is 40.

Common Fields : These fields are common for all categories

Name Description
id The unique identifier of the order.
type The type of the transfer, which is either deposit or withdrawal.
currency The currency that the transfer was made in.
amount The amount of the deposit/withdrawal.
completed_at Unix timestamp in milliseconds when the transfer order is complete. Shows only when the order is complete.
updated_at Unix timestamp in milliseconds when the transfer order was last updated. The transfers are ordered by this field, most recently updated transfer showing at the top.
created_at Unix timestamp in milliseconds by the time the transfer order was initiated.
status Current status of the order.
fee The amount of the fee that was charged for withdrawal. Shows only for filled withdrawals that a fee was incurred. The currency is equivalent to the currency of the withdrawal.

Sub-fields (For coin deposit/withdrawal)

Name description
details.transaction_id Transaction ID of the coin deposit/withdrawal.
details.address Destination address of the coin.
details.destination_tag Destination tag that shows up only when the transfer is requested in XRP.

Sub-fields (For fiat deposit/withdrawal)

Name description
details.bank Name of the bank used for this transaction.
details.account_number Account number of the bank
details.owner Recipient of the bank transfer

Transaction History - Order Fills

Request

curl -D - -H "Authorization: Bearer $ACCESS_TOKEN" https://api.korbit.co.kr/v1/user/transactions?currency_pair=$CURRENCY_PAIR

Response

[
  {
    "timestamp": 1383707746000,
    "completedAt": 1383797746000,
    "id": "599",
    "type": "sell",
    "fee":{"currency":"krw","value":"1500"},
    "fillsDetail":{
      "price": {"currency": "krw", "value": "1000000"},
      "amount": {"currency": "btc", "value": "1"},
      "native_amount": {"currency": "krw", "value": "1000000"},
      "orderId":"1002"
    }
  },
  {
    "timestamp": 1383705741000,
    "completedAt": 1383797746200,
    "id": "597",
    "type": "buy",
    "fee":{"currency":"btc","value":"0.0015"},
    "fillsDetail":{
      "price": {"currency": "krw", "value": "1000000"},
      "amount": {"currency": "btc", "value": "1"},
      "native_amount": {"currency": "krw", "value": "1000000"},
      "orderId":"1002"
    }
  }
]

GET https://api.korbit.co.kr/v1/user/transactions

This API call is separated into two new enhanced calls (View Exchange Orders and View Transfers). Although this call will still remain in limited functionality for existing users’ convenience, the category parameter will be limited to 'fills’, and 'balance’ field will be removed from the call response. Hence, using the updated calls is strongly recommended.

PARAMETERS

Parameter Description
currency_pair The type of trading currency of which information you want to query for. Bitcoin trading is default.
you can also specify “etc_krw” for Ethereum Classic trading, “eth_krw” for Ethereum trading, “xrp_krw” for Ripple trading, “bch_krw” for Bitcoin Cash trading and “ltc_krw” for Litecoin trading. Coins other than BTC, ETC, ETH, XRP, BCH, LTC are not supported yet.
offset/limit Offset and limit for pagination of transactions. You can specify the 'offset’, which is 0-based, to get the list of transactions starting from the offset. You can also provide the 'limit’ to specify the number of transactions you want to get. The default value of 'offset’ is 0 and 'limit’ is 10.
order_id This parameter is valid only if you are getting 'fills’ category. You can specify the ID of a filled order to get the details of order fills. You can repeat this parameter to get a list of order fills for a given set of order IDs, such as order_id=1&order_id=2.

Common Fields : These fields are common for all categories

Name Description
timestamp Unix timestamp in milliseconds specifying the time that the transaction happened.
completedAt Unix timestamp in milliseconds specifying the time the transaction was completed. For 'fills’ category this field is always set. For deposits and withdrawals of BTC and KRW, you have this field only if it is successfully completed. Any pending deposits or withdrawals do not have this field set.
id The unique identifier of the transaction. The ID is unique within the category boundary. For example, the 'id’ field is unique within 'fills’ category, but the same ID can be used in 'krw’ or 'btc’ category.
type The type of transaction. See the list of Transaction Types shown below.
fee In case category is 'fills’, you have the fee paid by user in this field. The fee paid by buyer comes with 'btc’ currency, and the fee paid by seller comes with 'krw’ currency. In case category is 'fiats’ and type is 'fiat-out’, you have the fee paid for KRW withdrawal. In case category is 'coins’ and type is 'coin-out’, you have the fee paid for BTC withdrawal. In other cases, you don’t have this field in the response.

Transaction type

This is the list of transaction types you get in the 'type’ field on the response. The string within the parenthesis denotes the category parameter you specify. The transaction type can come only if you specify the given category. For each category you get a detailed transaction type. For example, for 'fills’ category, you get order fills happened either by your bidding order(type=0) or your asking order(type=1).

BTC

Name description
buy (fills) Bitcoin Order fills - Bidding order.
sell (fills) Bitcoin Order fills - Asking order.

ETC   BETA service

Name description
buy (fills) Ethereum Classic Order fills - Bidding order.
sell (fills) Ethereum Classic Order fills - Asking order.

ETH   BETA service

Name description
buy (fills) Ethereum Order fills - Bidding order.
sell (fills) Ethereum Order fills - Asking order.

Sub-fields(fillsDetail)

You have following sub-fields under 'fillsDetail’ field, which comes only if the category is 'fills’.

Name description
price The price of an order fill. You have two sub-fields. One is 'currency’, which is always set to 'krw’ for now. Another is 'value’, which is set to the filled price.
amount The amount of selected currency in the order fill. You have two sub-fields. One is 'currency’, which is set to one currency you selected in currency_pair field among 'btc’, 'etc’ or 'eth’. Another is 'value’, which is set to the filled amount of that selected currency.
native_amount The calculated amount of the order represented in KRW, based on the filled price.
orderId The ID of the filled order. This is the ID of order you placed.

Trading Volume and Fees

Request

curl -D - -H "Authorization: Bearer $ACCESS_TOKEN" "https://api.korbit.co.kr/v1/user/volume?currency_pair=$CURRENCY_PAIR"

Response

{
  "btc_krw": {
    "volume" : "17570000",
    "maker_fee" : "0.00100000",
    "taker_fee" : "0.00200000"
  },
  "eth_krw": {
    "volume" : "0",
    "maker_fee" : "0.00100000",
    "taker_fee" : "0.00200000"
  },
  "etc_krw": {
    "volume" : "6570000",
    "maker_fee" : "0.00100000",
    "taker_fee" : "0.00200000"
  },
  "total_volume" : "24140000",
  "timestamp" : 1386418990000
}

To act in line with our newly adopted trading fee policy, we are going to provide API for trading volumes of users in BTC, ETH, ETC, XRP, BCH exchanges. Trading volumes and fee rates are calculated at an every exact 24 hour interval.

GET https://api.korbit.co.kr/v1/user/volume

PARAMETERS

Parameter Default Description
currency_pair all The type of exchange of which trading volume and trading fee rates you want to query for. You can specify btc_krw / eth_krw / etc_krw / xrp_krw / bch_krw / ltc_krw / all in the parameter and each indicates requesting for trading volumes and trading fee rates in Bitcoin exchange / Ethereum exchange / Ethereum Classic exchange / Ripple exchange / Bitcoin Cash exchange / all exchanges.

ATTRIBUTES

Name Description
currency_pair The type of currency corresponding to the trading volume and trading fee rates.
volume User’s trading volume in the corresponding exchange during the last 30 days in KRW.
maker_fee The rate of trading fee for maker in basis points(BPS).
taker_fee The rate of trading fee for taker in basis points(BPS).
total_volume User’s total trading volume of all exchanges in KRW.
timestamp Unix timestamp in milliseconds of the last time when trading volume and fees are calculated on an hourly basis.

Wallet

Check ETH, ETC, and KRW and BTC balances. Request or cancel BTC withdrawals.

Check user’s balances

Request

curl -D - -H "Authorization: Bearer $ACCESS_TOKEN" https://api.korbit.co.kr/v1/user/balances

Response

{
  "krw" : {
      "available" : "123000",
      "trade_in_use" : "13000",
      "withdrawal_in_use" : "0"
  },
  "btc" : {
      "available" : "1.50200000",
      "trade_in_use" : "0.42000000",
      "withdrawal_in_use" : "0.50280000",
      "avg_price": "7115500",
      "avg_price_updated_at": 1528944850000
  },
  "eth" : {
      "available" : "4.80200000",
      "trade_in_use" : "1.23238000",
      "withdrawal_in_use" : "0.00000000",
      "avg_price": "529000",
      "avg_price_updated_at": 1528944250000
  },
  "etc" : {
      "available" : "10.00000000",
      "trade_in_use" : "2.00000000",
      "withdrawal_in_use" : "0.00000000",
      "avg_price": "14770",
      "avg_price_updated_at": 1528945850000
  },
  "xrp" : {
      "available" : "134524.657899",
      "trade_in_use" : "2332.000000",
      "withdrawal_in_use" : "0.000000",
      "avg_price": "594",
      "avg_price_updated_at": 1528944340000
  }
  ...
}

You can retrieve the balances and stats for each currency by using the following API call.

GET https://api.korbit.co.kr/v1/user/balances

ATTRIBUTES

Name Description
available The amount of funds you can use.
trade_in_use The amount of funds that are being used in trade.
withdrawal_in_use The amount of funds that are being processed for withdrawal.
avg_price The break even price in krw for coin.
avg_price_updated_at The timestamp that the break even price is updated.

Check account info

Request

curl -D - -H "Authorization: Bearer $ACCESS_TOKEN" https://api.korbit.co.kr/v1/user/accounts

Response

{
  "deposit": {
    "btc": {
      "address" :"3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"
    },
    "etc": {
      "address" :"0x123f681646d4a755815f9cb19e1acc8565a0c2aa"
    },
    "eth": {
      "address" :"0x123f681646d4a755815f9cb19e1acc8565a0c2ac"
    },
    "xrp": {
      "address" : "rMmTCjGFRWPz8S2zAUUoNVSQHxtRQD4eCx",
      "destination_tag" : "100022001"
    },
    "ltc": {
      "address": "MBRQmAR24h4RXZwMXmVjDBDdQZhQ2LAnjH"
    },
    "krw": {
      "bank_name" : "신한은행",
      "account_number" : "1221000022201",
      "account_name" : "(주)코빗"
    }
  },
  "withdrawal": {
    "krw": {
      "bank_name": "신한은행",
      "account_name": "홍길동",
      "account_number": "1002653684770"
    }
  }
}

You can retrieve the wallet/bank info by using the following API call.

GET https://api.korbit.co.kr/v1/user/accounts

ATTRIBUTES

Name Description
address The address of your wallet.
destination_tag Destination tag used in XRP transactions. Only shows for XRP account.
bank_name The name of the bank. Shows only for KRW.
account_number The account number of the bank. Shows only for KRW.
account_name The name of the owner of the registered bank. Shows only for KRW.

Assign BTC Address

Request

curl -D - -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -d "currency=$CURRENCY&nonce=$NONCE" https://api.korbit.co.kr/v1/user/coins/address/assign

Response

{
  "address":"1F1xAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX",
  "status":"success"
}

POST https://api.korbit.co.kr/v1/user/coins/address/assign

Since all BTC exchanges within Korbit are made internally, a BTC address does not need to be assigned to every user. However, to receive BTC from an outside source to your Korbit account, you can set up your BTC receiving address by using the following API.

PARAMETERS

Parameter Description
currency A mandatory parameter. Currently only currency=“btc”, which means Bitcoin is supported.

ATTRIBUTES

Name Description
address The newly assigned BTC address. Korbit has the private key of the address to process withdrawal request on behalf of the user. If the BTC address is already assigned to the user the existing one is set to this field.
status ‘success’, if a new BTC address was assigned, an error symbol otherwise.

Error Symbols

Error Name Description
already_assigned The user already has a BTC address assigned.
no_more_address No BTC address is available in Korbit system. Korbit system administrator needs to allocate more BTC addresses.
save_failure This is an internal error. Usually it should not happen.

Request BTC Withdrawal

Request

curl -D - -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -d "currency=$CURRENCY&amount=$AMOUNT&address=$ADDRESS&nonce=$NONCE" https://api.korbit.co.kr/v1/user/coins/out

Response

{
  "transferId":"21591",
  "status":"success"
}

POST https://api.korbit.co.kr/v1/user/coins/out

PARAMETERS

Parameter Description
currency A mandatory parameter. Currently only currency=“btc”, which means Bitcoin is supported.
amount The amount of BTC to withdraw.
address The BTC address to where the BTC is sent.
fee_priority Optional parameter to select withdrawal fee. Set “normal” for fee 0.001 or “saver” for 0.0005. If it is not set, “normal” fee is applied. (Starting from 2017-03-17 2pm KST)

ATTRIBUTES

Name Description
transferId The unique ID of the BTC withdrawal request. You can use this ID to cancel a BTC withdrawal request or get the status of it.
status 'success’ if the BTC withdrawal was successful, an error symbol otherwise.

Error Symbols

Error Name Description
another_transfer_in_progress An on-going BTC withdrawal request exists. It takes less than 10 seconds for a BTC withdrawal request to finish. You can create a BTC withdrawal request only if the previous request was successfully finished, or you canceled it.
exceeds_api_daily_limit The user tried to withdraw BTC more than the maximum limit per day. Currently a user can withdraw up to 3 BTC per day using API.
exceeds_available_size The user tried to transfer BTC more than the available amount of BTC.
save_failure This is an internal error. Usually it should not happen.

Query Status of BTC Deposit and Transfer

Request

curl -D - -H "Authorization: Bearer $ACCESS_TOKEN" https://api.korbit.co.kr/v1/user/coins/status

Response : A completed BTC Deposit

[
  {
    "timestamp": 1392620446000,
    "id": "5180",
    "type": "coin-in",
    "amount": { "currency": "btc", "value": "0.01"},
    "in": "1anjg6B2XbpjHx8LFw8mXHATH54vrxs2F",
    "completedAt": 1392620446100
  }
]

GET https://api.korbit.co.kr/v1/user/coins/status

Response : A pending BTC withdrawal request

[
  {
    "timestamp": 1392620446000,
    "id": "5180",
    "type": "coin-out",
    "amount": { "currency": "btc", "value": "0.01"},
    "out": "1anjg6B2XbpjHh8LFw8xXHATH54vrxs2F"
  }
]

Response : A completed BTC withdrawal request

[
  {
    "timestamp": 1392620446000,
    "id": "5180",
    "type": "coin-out",
    "amount": { "currency": "btc", "value": "0.01"},
    "out": "1anjg6B2XbpjHh8LFw8xXHATH54vrxs2F",
    "completedAt": 1392620946300
  }
]

You can query status of BTC deposits and transfers by using the following API.

PARAMETERS

Parameter Description
currency A mandatory parameter. Currently only currency=“btc”, which means Bitcoin is supported.
id The unique ID of the BTC withdrawal request. If this parameter is not specified, the API responds with a pending BTC withdrawal request if any.

ATTRIBUTES

Name Description
timestamp Unix timestamp in milliseconds by the time the BTC deposit or withdrawal request was created.
id The unique ID of BTC deposit or withdrawal request.
type “coin-in” if it is a BTC deposit request, “coin-out” if it is a BTC withdrawal request.
amount The amount of BTC to deposit or withdraw. The value field in it has the amount of deposit or withdrawal. The currency field in it is always 'btc’ for now.
in The user’s BTC address assigned in Korbit system to receive BTC. This field comes only if type is 'coin-in’.
out The user’s BTC address to where BTC was sent. this field comes only if type is 'coin-out’.
completedAt Unix timestamp in milliseconds by the time the BTC deposit or withdrawal was completed. If it is pending, this field is not included in the response.

Cancel BTC Transfer Request

Request

curl -D - -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -d "currency=$CURRENCY&id=$ID&nonce=$NONCE" https://api.korbit.co.kr/v1/user/coins/out/cancel

Response

{
  "transferId":"21591",
  "status":"success"
}

POST https://api.korbit.co.kr/v1/user/coins/out/cancel

You can cancel a BTC transfer request by using following API. In case the transfer is being processed by an administrator, or it is completed, you get an error code.

PARAMETERS

Parameter Description
currency A mandatory parameter. Currently only currency=“btc”, which means Bitcoin is supported.
id The unique ID of the BTC withdrawal request.

ATTRIBUTES

Name Description
id The unique ID of the BTC withdrawal request specified on the 'id’ parameter.
status 'success’ if it was successfully canceled, an error symbol otherwise.

Error Symbols

Error Name Description
not_found The BTC withdrawal request does not exist. If a wrong value is specified on the 'id’ parameter , you can get this error symbol.
not_found The user tried to cancel a BTC withdrawal request created by another user.
transfer_locked The BTC withdrawal process has already been started, so it is impossible to cancel it.
already_filled The BTC withdrawal process has already been completed, so it is impossible to cancel it.

Getting API Keys

Receive an API key at the following URL : https://www.korbit.co.kr/settings/api