We are excited to introduce Korbit's new Open API service! With this service, you can freely access a variety of cryptocurrency exchange functions, including price inquiries, orders, deposits, and withdrawals, all through our Open API.
Any Korbit member can utilize the Korbit Open API to develop their own programs or send API requests, integrating their cryptocurrency trading strategies with the exchange.
For the latest news and detailed information about the Open API, please visit our Developer Center. Start using the Korbit Open API today to implement your own programs and strategies!
https://api.korbit.co.kr
wss://ws-api.korbit.co.kr/v2/public (Public Type)
wss://ws-api.korbit.co.kr/v2/private (Private Type)
To use the Korbit Open API, you need to generate an API key. Any Korbit member can create an API key through the Korbit Developers.
When creating an API key, you can choose between two authentication signature methods: HMAC-SHA256 and ED25519.
HMAC-SHA256: Korbit generates the secret key required for signing and provides it to the user.
ED25519: The user generates an ED25519 key pair (public key and private key) and provides the public key to Korbit during the API key creation process.
For subsequent Open API usage, the user must send API requests signed with the method corresponding to their API key.
HMAC-SHA256: Convenient because Korbit generates the secret key for you. (Korbit securely encrypts and stores your secret key.)
ED25519: Requires the user to generate their own ED25519 key pair, which can be cumbersome but offers the advantage of enhanced security since the private key is not exposed.
For more detailed information, please refer to the Korbit Developers.
import { generateKeyPairSync } from "crypto";
const { publicKey, privateKey } = generateKeyPairSync("ed25519", {
publicKeyEncoding: {
type: "spki",
format: "pem",
},
privateKeyEncoding: {
type: "pkcs8",
format: "pem",
},
});
// Public Key (PKIX Format), Private Key (PKCS #8 Format)
console.log(publicKey, privateKey);
# Private Key
openssl genpkey -algorithm ED25519 -out private_key.pem
# Public Key
openssl pkey -in private_key.pem -pubout -out public_key.pem
You can modify the permissions and other settings of your API key or delete it through the Korbit Developers. An API key is valid for one year from the date of creation, and the available functions vary depending on the permissions set. For instance, to place or cancel orders, you need an API key with the Order Placement permission.
Additionally, each API key can be restricted to specific IP addresses (up to a maximum of 20), which can also be configured in the Developer Center.
When you add, modify, or delete API keys, it may take up to 1 minute for the changes to be applied.
To use the REST API, you need to send HTTP requests to the Open API server (https://api.korbit.co.kr).
For GET and DELETE method requests, include the values in the URL query string. For POST method requests, include the values in the request body using the application/x-www-form-urlencoded format. The order of the input variables does not matter.
API responses are provided in JSON format, and the time is given in UNIX timestamp (in milliseconds).
Public APIs, such as quotation APIs, are open for anyone to use without an API key or authentication.
Private APIs, such as orders, assets, and deposits/withdrawals APIs, are available to Korbit members through their accounts. To use these, you need to obtain an API key and send authenticated API requests signed accordingly.
The accessibility of the private APIs depends on the seven permissions you can set for each API key: Asset Inquiry, Order Inquiry, Order Placement, Deposit Inquiry, Deposit Request, Withdrawal Inquiry, Withdrawal Request
For example, if you want to place or cancel orders via the Open API, you need to grant Order Placement permission to the API key. If you want to limit the key to only allow trading without deposit/withdrawal capabilities, do not grant Deposit Request and Withdrawal Request permissions.
For details on signing requests, refer to the section on Sending Signed Requests.
curl 'https://api.korbit.co.kr/v2/tickers?symbol=btc_krw'
When using the REST API, there are rate limits on the number of requests you can make within a certain timeframe, depending on the type of API. If you exceed these limits, you may encounter a 429 Too Many Requests error. The only consequence of exceeding the rate limit is that you will not receive valid API responses until the limit is reset.
Rate limits are measured based on the IP address for public APIs such as Get Orderbook, while private APIs, like Place Order, are measured based on the member account (not the API key, but the member account). The policies vary by API type as follows:
200 OK
Ratelimit: limit=50, remaining=48, reset=1
Ratelimit-Policy: 50;w=1
429 Too Many Requests
Retry-After: 1
Ratelimit-Policy: 30;w=1
Korbit Developers provides a FAQ section.
Additionally, Developers offers code examples for sending HMAC-SHA256 or ED25519 signed requests for using the Private API in Go, Node.js, and Python.
Korbit Open API operates on an asynchronous system. Therefore, there may be slight delays in the response data, which is expected and indicates normal operation.
If there is any discrepancy between the Korean API documentation and the English API documentation, the Korean API documentation shall prevail.
With the Open API update, additional fields may be included in the API response. Therefore, when developing a program using the Open API, please consider that new fields might be added to the API response.
The following explains how to sign API requests based on the authentication method (HMAC-SHA256, ED25519) selected during API key creation.
HMAC-SHA256: Korbit generates and provides a secret key, which users must use to sign their API requests using the HMAC-SHA256 method.
ED25519: Users generate their own ED25519 key pair and provide the public key to Korbit during API key creation. Users then sign their API requests using the private key from the key pair.
When making an authenticated API request, you must send a signed request, which includes the signature and timestamp parameters.
The signature parameter is the result of signing a concatenated string of the input variables and the timestamp using either the HMAC-SHA256 or ED25519 method. The timestamp parameter is the current UNIX timestamp in milliseconds. The signature must be included in either the URL query string or the request body.
To ensure time accuracy during signing, the current UNIX timestamp in milliseconds MUST be provided as the timestamp parameter. Therefore, you should first ensure that your computer's current time is synchronized with the standard time. (Note: You can check the time on the Korbit Open API server using the GET /v2/time API.)
Due to potential delays in the network or computer environment, there might be a time difference between when the client signs the request and when the Open API server receives it. In the fast-paced world of cryptocurrency trading, timing is crucial. To prevent unintended request results due to significant time differences, the Korbit Open API can be configured to ignore requests if the time difference exceeds a certain value.
recvWindow: This optional parameter allows users to specify the maximum allowable time difference (in milliseconds) between the signing time and the time the API server receives the request. If not provided, the default value is 5000 milliseconds (5 seconds). The maximum allowable value for this parameter is 60000 milliseconds (60 seconds). For example, if recvWindow=3000 is provided, the API request will be rejected if the server receives it more than 3 seconds after the timestamp.
Lastly, the timestamp cannot be set to a future time. Any request with a timestamp more than 1 second ahead of the API server's time will be rejected.
If a request fails due to a clock error, the server will respond with the EXCEED_TIME_WINDOW error code. In this case, please check the server's time using the /v2/time API.
For stable API operations, please configure the NTP time synchronization feature in your OS.
if (serverTime - timestamp <= recvWindow && timestamp < serverTime + 1000) {
// PROCESS
} else {
// REJECT
}
Refer to the attached Node.js example code. Simply replace the API key and secret key with your own to place an order using the code.
If you have generated an API key (system-generated key) for authentication using HMAC-SHA256, first check the secret key provided by Korbit when the API key was created. Also, ensure that the API key has the permissions required to perform the desired functions.
For example, if you want to use the Place Order function, you need to send a POST request to the /v2/orders endpoint of the Korbit Open API. Enter the request parameters according to the order details.
If you want to place a buy order for 1 BTC at a price of 100 million KRW, i.e., a BTC/KRW limit buy order (buy price 100,000,000 and buy quantity 1), you can enter the request parameters as follows:
symbol: btc_krw
side: buy
price: 100000000
qty: 1
Optionally, you can add the timeInForce value to set GTC, IOC, FOK, or Post Only. For a simple limit order, GTC is the default, so you can omit timeInForce or set it to gtc.
For GET and DELETE method requests, enter the request parameters in the URL query string. For POST method requests, enter them in the request body in application/x-www-form-urlencoded format.
Next, as mentioned earlier, you need to enter the current UNIX timestamp (in milliseconds) as the timestamp value. In the example code, recvWindow is set to 5000, but you can omit recvWindow if you want (it defaults to 5000). Note that the order of the request parameters, including the timestamp, does not matter.
To sign the message, concatenate all request parameters into a single string, and then generate the HMAC-SHA256 signature using the secret key.
For example, create a string like symbol=btc_krw&side=buy&price=100000000&qty=1&orderType=limit×tamp=1719232467910, and sign it using the secret key. Refer to the API documentation, Developers examples, or resources like internet searches or ChatGPT for HMAC-SHA256 signature generation methods in different programming languages.
If request parameters exist in both the URL query string and the HTTP request body, concatenate them as-is. For example, if timestamp=1719232467910 is in the query string and symbol=btc_krw is in the request body, the string to sign becomes timestamp=1719232467910symbol=btc_krw (note: no & between query string and request body).
Once the signature is generated, add it to the request parameters as signature.
It's time to send the API request. For private API requests like placing an order, send the API key in the HTTP request header as X-KAPI-KEY along with the signed message. If you are not using a library that automatically handles HTTP requests, also include Content-Type: application/x-www-form-urlencoded.
If the request is successful, you will receive a response indicating that the order has been placed in JSON format. Note that even if the request is successful, the order will not be placed if you do not have sufficient KRW balance to purchase the cryptocurrency.
// Node.js Example
import crypto from "crypto";
const apiKey = "XyAZ_apaUv9pg4ZyGzNHTxabfIDrWIRpPBgk5-olIuM"; // API Key
const apiSecret = "ZwKS2evdxj9j3Neir2s0UHAmpNFfo4a0iHawEElGCBs"; // HMAC-SHA256 Secret Key
const baseUrl = "https://api.korbit.co.kr"; // Base URL
// Create HMAC-SHA256 Signature
const createHmacSignature = (query) => {
return crypto.createHmac("sha256", apiSecret).update(query, "utf-8").digest("hex");
};
// Place Order (POST Method Example)
const placeOrder = async (symbol, side, price, qty, orderType, timeInForce) => {
const timestamp = Date.now(); // Timestamp (ms)
// Request Parameters
const params = new URLSearchParams({
symbol: symbol,
side: side,
price: price,
qty: qty,
orderType: orderType,
timeInForce: timeInForce,
timestamp: timestamp,
});
// Create Signature
const signature = createHmacSignature(params.toString());
// Add Signature to params
params.append("signature", signature);
// API Endpoint
const url = `${baseUrl}/v2/orders`;
const headers = {
"X-KAPI-KEY": apiKey, // API Key
"Content-Type": "application/x-www-form-urlencoded", // POST Method
};
try {
const response = await fetch(url, {
method: "POST",
headers: headers,
// POST Request: params in body
body: params.toString(),
});
const data = await response.json();
return data;
} catch (error) {
console.error("Error Place Order:", error);
}
};
// Cancel Order (DELETE Method Example)
// You can use this code for GET Method; modify method to "GET".
const cancelOrder = async (symbol, orderId) => {
const timestamp = Date.now(); // Timestamp (ms)
// Request Parameters
const params = new URLSearchParams({
symbol: symbol,
orderId: orderId,
timestamp: timestamp,
});
// Create Signature
const signature = createEd25519Signature(params.toString());
// API Endpoint
const url = `${baseUrl}/v2/orders`;
const headers = {
"X-KAPI-KEY": apiKey, // API Key
};
// Add Signature to params
params.append("signature", signature);
try {
// GET, DELETE Method: params in URL Querystring
const response = await fetch(url + "?" + params.toString(), {
method: "DELETE",
headers: headers,
});
const data = await response.json();
return data;
} catch (error) {
console.error("Error Cancel Order:", error);
}
};
// Place Order: Buy BTC
placeOrder("btc_krw", "buy", "90000000", "0.5", "limit", "gtc")
.then((data) => console.log("Order Response:", data))
.catch((err) => console.error("Order Error:", err));
// Cancel Order: BTC, OrderID 1000001234
cancelOrder("btc_krw", 1000001234)
.then((data) => console.log("Cancel Response:", data))
.catch((err) => console.error("Cancel Error:", err));
Refer to the attached Node.js example code. Simply replace the API key and private key with your own to place an order using the code.
If you have generated an API key for authentication using the ED25519 method (user-generated key), first check the private key you provided to Korbit when creating the key. Also, ensure that the API key has the permissions required to perform the desired functions.
For example, if you want to use the Place Order function, you need to send a POST request to the /v2/orders endpoint of the Korbit Open API. Enter the request parameters according to the order details.
If you want to place a buy order for 1 BTC at a price of 100 million KRW, i.e., a BTC/KRW limit buy order (buy price 100,000,000 and buy quantity 1), you can enter the request parameters as follows:
symbol: btc_krw
side: buy
price: 100000000
qty: 1
Optionally, you can add the timeInForce value to set GTC, IOC, FOK, or Post Only. For a simple limit order, GTC is the default, so you can omit timeInForce or set it to gtc.
For GET and DELETE method requests, enter the request parameters in the URL query string. For POST method requests, enter them in the request body in application/x-www-form-urlencoded format.
Next, as mentioned earlier, you need to enter the current UNIX timestamp (in milliseconds) as the timestamp value. In the example code, recvWindow is set to 5000, but you can omit recvWindow if you want (it defaults to 5000). Note that the order of the request parameters, including the timestamp, does not matter.
To sign the message, concatenate all request parameters into a single string, and then generate the ED25519 signature using the private key.
For example, create a string like symbol=btc_krw&side=buy&price=100000000&qty=1&orderType=limit×tamp=1719232467910, and sign it using the private key. Refer to the API documentation, Developers examples, or resources like internet searches or ChatGPT for ED25519 signature generation methods in different programming languages.
The generated ED25519 signature must be encoded in Base64 format before being sent to Korbit.
If request parameters exist in both the URL query string and the HTTP request body, concatenate them as-is. For example, if timestamp=1719232467910 is in the query string and symbol=btc_krw is in the request body, the string to sign becomes timestamp=1719232467910symbol=btc_krw (note: no & between query string and request body).
Once the signature is generated, add it to the request parameters as signature.
It's time to send the API request. For private API requests like placing an order, send the API key in the HTTP request header as X-KAPI-KEY along with the signed message. If you are not using a library that automatically handles HTTP requests, also include Content-Type: application/x-www-form-urlencoded.
When using an ED25519 API key, ensure that the Base64-encoded signature is URL-encoded when sent to Korbit. Use a utility like URLSearchParams in Node.js to handle the string conversion automatically or ensure the library used for sending HTTP requests properly URL-encodes the data. If handling HTTP requests manually, as with cURL, use the --data-urlencode option.
If the request is successful, you will receive a response indicating that the order has been placed in JSON format. Note that even if the request is successful, the order will not be placed if you do not have sufficient KRW balance to purchase the cryptocurrency.
// Node.js Example
import crypto from "crypto";
const apiKey = "IrZybUY2WX-Quq_CHC5XQnq80CTVjUwd51TH3-yF6xY"; // API Key
const privateKeyPem = `-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIIyEYpSboChBdAqcvZUB7PVJNV37whhYeZq/wIo+PSej
-----END PRIVATE KEY-----`;
const baseUrl = "https://api.korbit.co.kr"; // Base URL
// Create ED25519 Signature
const createEd25519Signature = (data) => {
const messageBuffer = Buffer.from(data);
const signature = crypto.sign(null, messageBuffer, {
key: privateKeyPem,
});
return signature.toString("base64");
};
// Place Order (POST Method Example)
const placeOrder = async (symbol, side, price, qty, orderType, timeInForce) => {
const timestamp = Date.now(); // Timestamp (ms)
// Request Parameters
const params = new URLSearchParams({
symbol: symbol,
side: side,
price: price,
qty: qty,
orderType: orderType,
timeInForce: timeInForce,
timestamp: timestamp,
});
// Create Signature
const signature = createEd25519Signature(params.toString());
// API Endpoint
const url = `${baseUrl}/v2/orders`;
const headers = {
"X-KAPI-KEY": apiKey, // API Key
"Content-Type": "application/x-www-form-urlencoded", // POST Method
};
// Add Signature to params (URLSearchParams: Base64 URL Safe)
params.append("signature", signature);
try {
const response = await fetch(url, {
method: "POST",
headers: headers,
// POST Request: params in body
body: params.toString(),
});
const data = await response.json();
return data;
} catch (error) {
console.error("Error Place Order:", error);
}
};
// Cancel Order (DELETE Method Example)
// You can use this code for GET Method; modify method to "GET".
const cancelOrder = async (symbol, orderId) => {
const timestamp = Date.now(); // Timestamp (ms)
// Request Parameters
const params = new URLSearchParams({
symbol: symbol,
orderId: orderId,
timestamp: timestamp,
});
// Create Signature
const signature = createEd25519Signature(params.toString());
// API Endpoint
const url = `${baseUrl}/v2/orders`;
const headers = {
"X-KAPI-KEY": apiKey, // API Key
};
// Add Signature to params (URLSearchParams: Base64 URL Safe)
params.append("signature", signature);
try {
// GET, DELETE Method: params in URL Querystring
const response = await fetch(url + "?" + params.toString(), {
method: "DELETE",
headers: headers,
});
const data = await response.json();
return data;
} catch (error) {
console.error("Error Cancel Order:", error);
}
};
// Place Order: Buy BTC
placeOrder("btc_krw", "buy", "90000000", "0.5", "limit", "gtc")
.then((data) => console.log("Order Response:", data))
.catch((err) => console.error("Order Error:", err));
// Cancel Order: BTC, OrderID 1000001234
cancelOrder("btc_krw", 1000001234)
.then((data) => console.log("Cancel Response:", data))
.catch((err) => console.error("Cancel Error:", err));
Get latest price and trading volume for a symbol or symbols.
Enter the symbols of the trading pairs you want to query, separated by commas (,). If omitted, information for all available trading pairs on Korbit will be returned.
btc_krw,eth_krw
Trading pair symbol
btc_krw
Open price (24H)
361922.23
High price (24H)
361922.23
Low price (24H)
361922.23
Last price (24H)
361922.23
Previous close price (24H)
261922.23
changed price. prevClose - close
261922.23
changed price percent. 100 * (prevClose - close) / prevClose
10
Trading volume (Base, 24H)
100
Trading volume (Quote/Counter, 24H)
1000000000
Best bid price
5000
Best ask price
6000
Last traded timestamp (ms)
1700000000000
curl 'https://api.korbit.co.kr/v2/tickers?symbol=btc_krw,eth_krw'
{
"success": true,
"data": [
{
"symbol": "btc_krw",
"open": "77060000",
"high": "79650000",
"low": "76550000",
"close": "77136000",
"prevClose": "77060000",
"priceChange": "76000",
"priceChangePercent": "0.1",
"volume": "48.73739983",
"quoteVolume": "3785149733.32633",
"bestBidPrice": "77136000",
"bestAskPrice": "77193000",
"lastTradedAt": 1725525721041
},
{
"symbol": "eth_krw",
"open": "3259000",
"high": "3370000",
"low": "3222000",
"close": "3250000",
"prevClose": "3259000",
"priceChange": "-9000",
"priceChangePercent": "-0.28",
"volume": "161.99278306",
"quoteVolume": "532827941.01581",
"bestBidPrice": "3251000",
"bestAskPrice": "3254000",
"lastTradedAt": 1725525545630
}
]
}
Get orderbook data.
Trading pair
btc_krw
timestamp (ms)
1700000000000
bids
price
250000
quantity
10
asks
price
250000
quantity
10
curl 'https://api.korbit.co.kr/v2/orderbook?symbol=btc_krw'
{
"success": true,
"data": {
"timestamp": 1708057740895,
"bids": [
{
"price": "73303000",
"qty": "0.00898326"
},
{
"price": "73302000",
"qty": "0.00790837"
},
{
"price": "73301000",
"qty": "0.00843099"
},
{
"price": "73300000",
"qty": "0.00054024"
},
{
"price": "73299000",
"qty": "0.00663446"
}
],
"asks": [
{
"price": "73304000",
"qty": "0.00985212"
},
{
"price": "73305000",
"qty": "0.00367505"
},
{
"price": "73306000",
"qty": "0.0096254"
},
{
"price": "73307000",
"qty": "0.00502544"
},
{
"price": "73308000",
"qty": "0.00640584"
}
]
}
}
Get recent trades.
Trading pair
btc_krw
limit (range: 1 ~ 500)
100
timestamp (ms)
1700000000000
price
250000
quantity
10
traded by an buy order
true
trade ID (The ID of the trade execution assigned to each trading pair.)
1234
curl 'https://api.korbit.co.kr/v2/trades?symbol=btc_krw&limit=4'
{
"success": true,
"data": [
{
"timestamp": 1708057271149,
"price": "70507000",
"qty": "0.00981535",
"isBuyerTaker": false
},
{
"timestamp": 1708057271035,
"price": "70508000",
"qty": "0.00682475",
"isBuyerTaker": false
},
{
"timestamp": 1708057270922,
"price": "70509000",
"qty": "0.00844147",
"isBuyerTaker": false
},
{
"timestamp": 1708057270809,
"price": "70510000",
"qty": "0.00553963",
"isBuyerTaker": false
}
]
}
Get historical candlesticks (klines) data.
Trading pair
btc_krw
interval
1 1 min5 5 mins15 15 mins30 30 mins60 1 hour240 4 hours1D 1 day1W 1 week60
start timestamp. (default: listed time)
1600000000000
end timestamp. must be larger than start. (default: now)
1700000000000
limit (range: 1 ~ 200)
100
candle start timestamp
1619244573612
open price
361922.23
high price
361922.23
low price
361922.23
close price
361922.23
volume
100
curl 'https://api.korbit.co.kr/v2/candles?symbol=btc_krw&interval=60&limit=5&end=1700000000000'
{
"success": true,
"data": [
{
"timestamp": 1708041600000,
"open": "71211000",
"high": "9999990000",
"low": "300000",
"close": "71392000",
"volume": "1.932320026577213946"
},
{
"timestamp": 1708045200000,
"open": "73510000",
"high": "74605000",
"low": "300000",
"close": "72315000",
"volume": "2.418698679231323743"
},
{
"timestamp": 1708048800000,
"open": "72315000",
"high": "9999990000",
"low": "300000",
"close": "72380000",
"volume": "1.947520219976227299"
},
{
"timestamp": 1708052400000,
"open": "70267000",
"high": "74777000",
"low": "300000",
"close": "74049000",
"volume": "2.254855048982521506"
},
{
"timestamp": 1708056000000,
"open": "68304000",
"high": "74834000",
"low": "68241000",
"close": "74825000",
"volume": "0.630193755379195341"
}
]
}
trading pair symbol
btc_krw
launched trading availablestopped trading unavailablelaunched
curl 'https://api.korbit.co.kr/v2/currencyPairs'
{
"success": true,
"data": [
{
"symbol": "btc_krw",
"status": "launched"
},
{
"symbol": "eth_krw",
"status": "launched"
},
{
"symbol": "xrp_krw",
"status": "stopped"
}
]
}
Use either orderId or clientOrderId to query the status of an individual order.
However, orders with the statuses expired or canceled cannot be retrieved approximately 3 days after they have been closed.
Trading pair
btc_krw
Enter orderID (responsed by POST /v2/orders). Enter one of orderID or clientOrderId.
1234
Enter clientOrderId (requested by POST /v2/orders). Enter one of orderID or clientOrderId.
20141231-155959-abcdef
Order ID generated by the server.
1234
clientOrderId submitted from the user by POST /v2/orders.
20141231-155959-abcdef
symbol
btc_krw
limit limit ordermarket market orderbest best bid/offerlimit
buysellbuy
Time in Force strategies.
gtc Good-Till-Canceled. The order will remain valid until terminated (fully executed or canceled)ioc Immediate-Or-Cancel. The order will be filled immediately, if can not then will be canceled. (Taker-Only)fok Fill-Or-Kill. The order will be filled fully, if can not then will be canceled. (Taker-Only)po Post-Only. If the order would be filled immediately, then will be canceled. (Maker-Only)Default:
gtciocFor market orders, only ioc can be entered.
gtc
Order price (limit/BBO order only. no price for market order. For BBO orders it's set after the price is determined)
5000
Order quantity (limit/BBO order or sell-side market order only. For BBO orders it's set after the quantity is determined)
10
Purchase amount in counter/quote asset like KRW. (buy-side market/BBO order only)
50000
Filled quantity
10
Filled amount in counter/quote asset like KRW.
50000
Average execution price
5000
Order timestamp (ms)
1700000000000
Last execution timestamp (ms)
1700000000000
Stop-limit order trigged timestamp
1700000000000
Order status
pending Order pending. When the balance is insufficient or timeInForce condition is triggered, the order may fail and change to the expired status.open Fully unfilledfilled Fully executedcanceled Fully canceledpartiallyFilled Partially filledpartiallyFilledCanceled Partially filled and remaining amount canceledexpired Order submission failed (due to insufficient balance or timeInForce conditions)partiallyFilled
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/orders?clientOrderId=20141231-155959-abcdef&symbol=btc_krw×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": {
"orderId": 1234,
"clientOrderId": "20141231-155959-abcdef",
"symbol": "btc_krw",
"orderType": "limit",
"side": "buy",
"timeInForce": "gtc",
"avgPrice": "5000",
"price": "5000",
"qty": "10",
"filledQty": "1",
"filledAmt": "5000",
"createdAt": 1700000000000,
"lastFilledAt": 1700000000000,
"status": "partiallyFilled"
}
}
Query the list of open orders for a single trading pair. Only orders with the status open or partiallyFilled are queried.
Trading pair
btc_krw
Number of queries (range: 1 to 1000). Default is 500.
100
Order ID generated by the server.
1234
clientOrderId submitted from the user by POST /v2/orders.
20141231-155959-abcdef
limit limit ordermarket market orderbest best bid/offerlimit
buysellbuy
Order price (limit/BBO order only. no price for market order. For BBO orders it's set after the price is determined)
5000
Order quantity (limit/BBO order or sell-side market order only. For BBO orders it's set after the quantity is determined)
10
Purchase amount in counter/quote asset like KRW. (buy-side market/BBO order only)
50000
Filled quantity
10
Filled amount in counter/quote asset like KRW.
50000
Average execution price
5000
Order timestamp (ms)
1700000000000
Last execution timestamp (ms)
1700000000000
Order status
pending Order pending. When the balance is insufficient or timeInForce condition is triggered, the order may fail and change to the expired status.open Fully unfilledfilled Fully executedcanceled Fully canceledpartiallyFilled Partially filledpartiallyFilledCanceled Partially filled and remaining amount canceledexpired Order submission failed (due to insufficient balance or timeInForce conditions)partiallyFilled
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/openOrders?limit=100&symbol=btc_krw×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": [
{
"orderId": 1234,
"orderType": "limit",
"side": "buy",
"avgPrice": "5000",
"price": "5000",
"qty": "10",
"filledQty": "1",
"filledAmt": "5000",
"createdAt": 1700000000000,
"lastFilledAt": 1700000000000,
"status": "partiallyFilled"
},
{
"orderId": 1235,
"orderType": "limit",
"side": "sell",
"price": "5000",
"qty": "10",
"filledQty": "0",
"filledAmt": "0",
"createdAt": 1700000000000,
"status": "open"
},
],
}
Query the recent order list for a single trading pair. Only orders created within 36 hours can be queried.
This API is for checking order history, and the information provided may have a delay of a few seconds.
If you need current information without delay, please use the /v2/openOrders or /v2/orders API.
Trading pair
btc_krw
Query start time. Only data up to 36 hours prior to the current time can be queried. If not set, the query will retrieve data from 36 hours ago by default.
Query end time. If not set, data will be retrieved up to the current time.
Maximum number of queries (range: 1 to 1000). Default is 500.
100
Order ID generated by the server.
1234
clientOrderId submitted from the user by POST /v2/orders.
20141231-155959-abcdef
symbol
btc_krw
limit limit ordermarket market orderbest best bid/offerlimit
buysellbuy
Time in Force strategies.
gtc Good-Till-Canceled. The order will remain valid until terminated (fully executed or canceled)ioc Immediate-Or-Cancel. The order will be filled immediately, if can not then will be canceled. (Taker-Only)fok Fill-Or-Kill. The order will be filled fully, if can not then will be canceled. (Taker-Only)po Post-Only. If the order would be filled immediately, then will be canceled. (Maker-Only)Default:
gtciocFor market orders, only ioc can be entered.
gtc
Order price (limit/BBO order only. no price for market order. For BBO orders it's set after the price is determined)
5000
Order quantity (limit/BBO order or sell-side market order only. For BBO orders it's set after the quantity is determined)
10
Purchase amount in counter/quote asset like KRW. (buy-side market/BBO order only)
50000
Filled quantity
10
Filled amount in counter/quote asset like KRW.
50000
Average execution price
5000
Order timestamp (ms)
1700000000000
Last execution timestamp (ms)
1700000000000
Stop-limit order trigged timestamp
1700000000000
Order status
pending Order pending. When the balance is insufficient or timeInForce condition is triggered, the order may fail and change to the expired status.open Fully unfilledfilled Fully executedcanceled Fully canceledpartiallyFilled Partially filledpartiallyFilledCanceled Partially filled and remaining amount canceledexpired Order submission failed (due to insufficient balance or timeInForce conditions)partiallyFilled
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/allOrders?limit=100&symbol=btc_krw×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": [
{
"orderId": 1234,
"clientOrderId": "20141231-155959-abcdef",
"symbol": "btc_krw",
"orderType": "limit",
"side": "buy",
"timeInForce": "gtc",
"avgPrice": "5000",
"price": "5000",
"qty": "10",
"filledQty": "1",
"filledAmt": "5000",
"createdAt": 1700000000000,
"lastFilledAt": 1700000000000,
"status": "partiallyFilled"
},
{
"orderId": 1235,
"clientOrderId": "20141231-155959-abcdeg",
"symbol": "btc_krw",
"orderType": "limit",
"side": "sell",
"timeInForce": "gtc",
"price": "5000",
"qty": "10",
"filledQty": "0",
"filledAmt": "0",
"createdAt": 1700000000000,
"lastFilledAt": 1700000000000,
"status": "open"
},
],
}
Query the recent trades list for a single trading pair. Only trade history from the past 36 hours can be queried.
This API is for checking trade history, and the information provided may have a delay of a few seconds.
Trading pair
btc_krw
Query start time. Only data up to 36 hours prior to the current time can be queried. If not set, the query will retrieve data from 36 hours ago by default.
Query end time. If not set, data will be retrieved up to the current time.
Maximum number of queries (range: 1 to 1000). Default is 500.
100
symbol
btc_krw
trade ID (The ID of the trade execution assigned to each trading pair.)
1234
order ID
1234
buysellbuy
trade price
5000
trade quantity (base)
10
trade amount (counter/quote)
50000
trade timestamp (ms)
1700000000000
taker trade true, maker trade false.
true
asset used for fee payment
krw
fee quantity
50
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/myTrades?limit=100&symbol=btc_krw×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": [
{
"symbol": "btc_krw",
"tradeId": 52,
"orderId": 382312,
"side": "buy",
"price": "5000",
"qty": "10",
"amt": "50000",
"tradedAt": 1700000000000,
"isTaker": true,
"feeCurrency": "krw",
"feeQty": "50"
}
],
}
Place a new order.
Trading pair
btc_krw
buysellbuy
order price for a limit order.
omit for a market/BBO order.
250000
order quantity for a limit order and a market/BBO sell order.
omit for a market/BBO buy order.
10
order amount (purchase amount) for a market/BBO buy order.
omit for a limit order and a market/BBO sell order.
250000
limit limit ordermarket market orderbest best bid/offer. The timeInForce and bestNth parameters must be set.limit
Selects the order's price when orderType=best. For other types, this parameter must be omitted.
gtc,ioc,fok: Opponent N price level where N is 1 ~ 5.po: Queue N price level where N is 1 ~ 5.1
Time in Force strategies.
gtc Good-Till-Canceled. The order will remain valid until terminated (fully executed or canceled)ioc Immediate-Or-Cancel. The order will be filled immediately, if can not then will be canceled. (Taker-Only)fok Fill-Or-Kill. The order will be filled fully, if can not then will be canceled. (Taker-Only)po Post-Only. If the order would be filled immediately, then will be canceled. (Maker-Only)Default:
gtciocFor market orders, only ioc can be entered.
gtc
User-defined order ID. Even if multiple requests are made with the same clientOrderId, it will be processed only once.
You can search for the order using clientOrderId with the GET /v2/orders. Only strings matching the following regex pattern are allowed: [0-9a-zA-Z.:_-]{1,36}
However, orders with the statuses expired or canceled cannot be searched by clientOrderId or same clientOrderId can be reused approximately three days after they have been closed.
20141231-155959-abcdef
Price protection. Set to true to enable the price protection feature. This order will only be executed within the price protection range when matched as a taker.
Use the ppPrecent parameter to change the threshold.
Threshold(in percent) for the price protection feature. Set an integer between 1 and 100.
If the price protection threshold is set to 5, this order will only be executed within 5% of the midpoint price (between the best ask and best bid) when matched as a taker order. Any unfilled quantity will be canceled.
If you enable price protection but do not set ppPercent, the default (5) will be used.
order ID
1234
curl -X POST -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/orders' -H Content-Type: application/x-www-form-urlencoded --data-raw orderType=limit&price=250000&qty=10&side=buy&symbol=btc_krw&timeInForce=gtc×tamp=TIMESTAMP&signature=SIGNATURE
{
"success": true,
"data": {
"orderId": 1234
}
}
Requests to cancel an open order.
If the API call is successful, the cancel request is accepted and the order will be canceled soon.
If the error code is one of ORDER_ALREADY_CANCELED, ORDER_ALREADY_FILLED, or ORDER_ALREADY_EXPIRED, it means the order has been already been closed.
Trading pair
btc_krw
orderId responsed in POST /v2/orders. You must choose to enter either orderId or clientOrderId.
1234
clientOrderId which is a user-defined order ID requested in POST /v2/orders. You must choose to enter either orderId or clientOrderId.
20141231-155959-abcdef
curl -X DELETE -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/orders?orderId=1234&symbol=btc_krw×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true
}
Get balance.
List of assets to query. Enter them separated by commas (,). If this field is not provided, all currently held assets will be queried.
btc,eth
asset name
krw
balance. available + tradeInUse + withdrawalInUse
100
available quantity
70
quantity in trade
20
quantity in withdrawal
10
average purchase price
5000
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/balance?currencies=btc%2Ceth×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": [
{
"currency": "btc",
"balance": "100",
"available": "70",
"tradeInUse": "20",
"withdrawalInUse": "10",
"avgPrice": "5000"
},
{
"currency": "eth",
"balance": "100",
"available": "70",
"tradeInUse": "20",
"withdrawalInUse": "10",
"avgPrice": "5000"
}
]
}
Retrieve the list of cryptocurrency deposit addresses.
symbol of the asset
btc
symbol of the blockchain network
ETH
deposit address
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
secondary address (destination tag, memo, etc. if none, then null.)
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/coin/depositAddresses?timestamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": [
{
"currency": "btc",
"network": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
},
{
"currency": "xrp",
"network": "XRP",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"secondaryAddress": "1234",
}
]
}
Get the deposit address for a single cryptocurrency.
symbol of the asset
btc
symbol of the blockchain network. List of networks can be queried using the /v2/currencies API.
Uses the default network if omitted. Please always specify the network to prevent possible errors, as the default network can be changed.
BTC
symbol of the asset
btc
symbol of the blockchain network
ETH
deposit address
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
secondary address (destination tag, memo, etc. if none, then null.)
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/coin/depositAddress?currency=btc×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": {
"currency": "btc",
"network": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
}
}
Generate a cryptocurrency deposit address. If a deposit address already exists, the existing address will be returned.
symbol of the asset
btc
symbol of the blockchain network. List of networks can be queried using the /v2/currencies API.
Uses the default network if omitted. Please always specify the network to prevent possible errors, as the default network can be changed.
BTC
symbol of the asset
btc
symbol of the blockchain network
ETH
deposit address
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
secondary address (destination tag, memo, etc. if none, then null.)
curl -X POST -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/coin/depositAddress' -H Content-Type: application/x-www-form-urlencoded --data-raw currency=btc×tamp=TIMESTAMP&signature=SIGNATURE
{
"success": true,
"data": {
"currency": "btc",
"network": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
}
}
Get recent deposit history.
symbol of the asset
btc
Maximum number of queries (range: 1 to 100).
100
deposit ID
1234
symbol of the blockchain network
ETH
deposit address
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
secondary address (destination tag, memo, etc. if none, then null.)
deposit status
pending Deposit transaction is detected on the network.actionRequired Pending deposit documentation submission. To process the deposit, please submit the required documents for approval on the Korbit website.reviewing Deposit documentation reviewing.done Deposit done.refunded Deposit amount returned after review rejection.failed Deposit failed (e.g., due to issues with the transaction).done
transaction hash
0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
symbol of the asset
btc
deposit quantity
1.234
deposit timestamp (ms)
1700000000000
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/coin/recentDeposits?currency=btc&limit=100×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": [
{
"id": 1234,
"network": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"secondaryAddress": null,
"status": "done",
"transactionHash": "0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
"currency": "btc",
"quantity": "1.234",
"createdAt": 1700000000000
}
]
}
Check the status of cryptocurrency deposits.
symbol of the asset
btc
deposit ID
1234
deposit ID
1234
symbol of the blockchain network
ETH
deposit address
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
secondary address (destination tag, memo, etc. if none, then null.)
deposit status
pending Deposit transaction is detected on the network.actionRequired Pending deposit documentation submission. To process the deposit, please submit the required documents for approval on the Korbit website.reviewing Deposit documentation reviewing.done Deposit done.refunded Deposit amount returned after review rejection.failed Deposit failed (e.g., due to issues with the transaction).done
transaction hash
0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
symbol of the asset
btc
deposit quantity
1.234
deposit timestamp (ms)
1700000000000
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/coin/deposit?coinDepositId=1234¤cy=btc×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": {
"id": 1234,
"network": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"secondaryAddress": null,
"status": "done",
"transactionHash": "0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
"currency": "btc",
"quantity": "1.234",
"createdAt": 1700000000000
}
}
Retrieve the list of addresses registered for API withdrawals.
symbol of the blockchain network
ETH
symbol of the asset. Omitted for withdraw addesses registered for any currency on the network.
btc
address
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
secondary address (destination tag, memo, etc. if none, then null.)
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/coin/withdrawableAddresses?timestamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": [
{
"network": "BTC",
"currency": "btc",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
},
{
"network": "ETH",
"address": "0x05a56e2d52c817161883f50c441c3228cfe54d9f"
}
]
}
Get the available cryptocurrency withdrawal amount.
Symbol of the cryptocurrency to query. If not provided, all assets will be queried.
btc
symbol of the asset
btc
withdrawable amount
1.52
amount in withdrawal
0.005
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/coin/withdrawableAmount?currency=btc×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": [
{
"currency": "btc",
"withdrawableAmount": "1.52",
"withdrawalInUseAmount": "0.005"
},
{
"currency": "eth",
"withdrawableAmount": "10.52",
"withdrawalInUseAmount": "2.5"
}
]
}
Request for cryptocurrency withdrawal. You need to register your withdrawal addresses for use with API in order to use this feature.
symbol of the asset
btc
symbol of the blockchain network. List of networks can be queried using the /v2/currencies API.
Uses the default network if omitted. Please always specify the network to prevent possible errors, as the default network can be changed.
BTC
amount of cryptocurrency to withdraw (not including fees)
0.02521236
Recipient address. Withdrawals can only be made to addresses registered for API withdrawals.
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
secondary address (destination tag, memo, etc. if none, omit or set to an empty string.)
Withdrawal status
pending Withdrawal request received.actionRequired Pending email confirmation (withdrawal can be canceled). To proceed with the withdrawal, you must verify the confirmation email.reviewing Pending withdrawal reviewing (withdrawal can be canceled). Withdrawal may be delayed according to Korbit's policy.processing Withdrawal processing.done Withdrawal done.canceled Withdrawal canceled.failed Withdrawal failed. (Insufficient balance or other error)pending
withdrawal ID
1234
curl -X POST -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/coin/withdrawal' -H Content-Type: application/x-www-form-urlencoded --data-raw address=1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa&amount=0.02521236¤cy=btc×tamp=TIMESTAMP&signature=SIGNATURE
{
"success": true,
"data": {
"status": "pending",
"coinWithdrawalId": 1234
}
}
Cancel a cryptocurrency withdrawal.
Withdrawals can only be canceled if the status is one of the following:
actionRequiredreviewingwithdrawal ID (responsed by POST /v2/coin/withdrawal)
1234
curl -X DELETE -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/coin/withdrawal?coinWithdrawalId=1234×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true
}
Get recent cryptocurrency withdrawal history.
symbol of the asset
btc
Maximum number of queries (Range: 1 to 100)
100
withdrawal ID
1234
withdrawn coin quantity excluding fees.
1.234
withdrawal fee
0.0001
symbol of the asset
btc
Withdrawal status
pending Withdrawal request received.actionRequired Pending email confirmation (withdrawal can be canceled). To proceed with the withdrawal, you must verify the confirmation email.reviewing Pending withdrawal reviewing (withdrawal can be canceled). Withdrawal may be delayed according to Korbit's policy.processing Withdrawal processing.done Withdrawal done.canceled Withdrawal canceled.failed Withdrawal failed. (Insufficient balance or other error)done
symbol of the blockchain network
ETH
withdrawal address
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
secondary address (destination tag, memo, etc. if none, then null.)
transaction hash on the blockchain. If not yet sent to the blockchain, null is returned.
0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
withdrawal request timestamp (ms)
1700000000000
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/coin/recentWithdrawals?currency=btc&limit=100×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": [
{
"id": 1234,
"quantity": "1.234",
"fee": "0.0001",
"currency": "btc",
"status": "done",
"network": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"secondaryAddress": null,
"transactionHash": "0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
"createdAt": 1700000000000
}
]
}
Get the status of the requested withdrawal.
symbol of the asset
btc
withdrawal ID
1234
withdrawal ID
1234
withdrawn coin quantity excluding fees.
1.234
withdrawal fee
0.0001
symbol of the asset
btc
Withdrawal status
pending Withdrawal request received.actionRequired Pending email confirmation (withdrawal can be canceled). To proceed with the withdrawal, you must verify the confirmation email.reviewing Pending withdrawal reviewing (withdrawal can be canceled). Withdrawal may be delayed according to Korbit's policy.processing Withdrawal processing.done Withdrawal done.canceled Withdrawal canceled.failed Withdrawal failed. (Insufficient balance or other error)done
symbol of the blockchain network
ETH
withdrawal address
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
secondary address (destination tag, memo, etc. if none, then null.)
transaction hash on the blockchain. If not yet sent to the blockchain, null is returned.
0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
withdrawal request timestamp (ms)
1700000000000
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/coin/withdrawal?coinWithdrawalId=1234¤cy=btc×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": {
"id": 1234,
"quantity": "1.234",
"fee": "0.0001",
"currency": "btc",
"status": "done",
"network": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"secondaryAddress": null,
"transactionHash": "0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
"createdAt": 1700000000000
}
}
Send a notification for KRW deposit requests to your Korbit mobile app.
After receiving the notification, you must complete the verification process for the deposit to proceed.
To receive notifications, ensure that push notifications are enabled in the app settings.
Amount of KRW to deposit
50000
curl -X POST -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/krw/sendKrwDepositPush' -H Content-Type: application/x-www-form-urlencoded --data-raw 'amount=50000×tamp=TIMESTAMP&signature=SIGNATURE'
{"success":true}
Send a notification for KRW withdrawal requests to your Korbit mobile app.
After receiving the notification, you must complete the verification process for the withdrawal to proceed.
To receive notifications, ensure that push notifications are enabled in the app settings.
Amount of KRW to withdraw
50000
curl -X POST -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/krw/sendKrwWithdrawalPush' -H Content-Type: application/x-www-form-urlencoded --data-raw 'amount=50000×tamp=TIMESTAMP&signature=SIGNATURE'
{"success":true}
Get recent KRW deposit history.
Maximum number of queries (range: 1 to 100).
100
Retrieve all transaction history.
false Only regular KRW deposits (default)true Includes additional items such as deposit fees, event rewards, etc.KRW deposit ID
1234
Deposit type (when includeAll=true)
general Regular KRW depositdepositInterest Deposit feemakerIncentive Maker incentivereward Event rewardetc OtherdepositInterest
KRW deposit status
pending Deposit request received.processing Processing deposit.reviewing Reviewing deposit.done Deposit done.canceling Deposit cancel requested.canceled Deposit canceled.failed Deposit failed.done
deposit quantity
1.234
deposit timestamp (ms)
1700000000000
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/krw/recentDeposits?limit=100×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": [
{
"id": 1234,
"status": "done",
"quantity": "50000",
"createdAt": 1700000000000
}
]
}
Get recent KRW withdrawal history.
Maximum number of queries (Range: 1 to 100)
100
KRW withdrawal ID
1234
Withdrawn KRW quantity excluding fees.
50000
withdrawal fee
1000
KRW withdrawal status
processing Processing withdrawal.done Withdrawal done.failed Withdrawal failed.canceled Withdrawal canceled.done
withdrawal request timestamp (ms)
1700000000000
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/krw/recentWithdrawals?limit=100×tamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": [
{
"id": 1234,
"quantity": "50000",
"fee": "1000",
"status": "done",
"createdAt": 1700000000000
}
]
}
Get cryptocurrencies information.
currency symbol
btc
currency name
Bitcoin
(deprecated) withdrawal status. Please refer to withdrawalStatus under the networkList field.
(deprecated) deposit status. Please refer to depositStatus under the networkList field.
(deprecated) number of confirmations required for deposits. Please refer to confirmationCount under the networkList field.
(deprecated) withdrawal fees. Please refer to withdrawalTxFee under the networkList field.
minimum withdrawal amount. Please refer to withdrawalMinAmount under the networkList field.
max withdrawal amount per each request
10
symbol for the default blockchain network
BTC
list of supported blockchain networks
network symbol
ETH
network name
Ethereum
possible to withdraw:
launched yesstopped nolaunched
possible to deposit:
launched yesstopped nolaunched
number of confirmations required for deposits
3
withdrawal fees
0.0001
minimum withdrawal amount
0.00000001
decimal places for withdrawal quantity
8
Whether the network has an secondary address
contract address
0x6b3595068778dd592e39a122f4f5a5cf09c90fe2
블록체인 탐색기 주소
https://etherscan.io/address/
curl 'https://api.korbit.co.kr/v2/currencies'
{
"success": true,
"data": [
{
"name": "krw",
"fullName": "Won",
"withdrawalMaxAmountPerRequest": "5000000000",
"depositStatus": "launched",
"withdrawalStatus": "launched",
"withdrawalTxFee": "1000",
"withdrawalMinAmount": "1000"
},
{
"name": "btc",
"fullName": "Bitcoin",
"withdrawalMaxAmountPerRequest": "120",
"defaultNetwork": "BTC",
"networkList": [
{
"name": "BTC",
"fullName": "Bitcoin",
"depositStatus": "launched",
"withdrawalStatus": "launched",
"confirmationCount": 3,
"withdrawalTxFee": "0.0008",
"withdrawalMinAmount": "0.0001",
"withdrawalPrecision": 8,
"hasSecondaryAddr": false,
"addressExplorerUrl": "https://www.blockchain.com/ko/btc/address/"
}
],
"depositStatus": "launched",
"withdrawalStatus": "launched",
"confirmationCount": "3",
"withdrawalTxFee": "0.0008",
"withdrawalMinAmount": "0.0001"
},
{
"name": "eth",
"fullName": "Ethereum",
"withdrawalMaxAmountPerRequest": "2000",
"defaultNetwork": "ETH",
"networkList": [
{
"name": "ETH",
"fullName": "Ethereum",
"depositStatus": "launched",
"withdrawalStatus": "launched",
"confirmationCount": 45,
"withdrawalTxFee": "0.005",
"withdrawalMinAmount": "0.0001",
"withdrawalPrecision": 8,
"hasSecondaryAddr": false,
"addressExplorerUrl": "https://etherscan.io/address/"
},
{
"name": "BASE",
"fullName": "BASE",
"depositStatus": "launched",
"withdrawalStatus": "launched",
"confirmationCount": 1,
"withdrawalTxFee": "0.001",
"withdrawalMinAmount": "0.0001",
"withdrawalPrecision": 8,
"hasSecondaryAddr": false,
"addressExplorerUrl": "https://basescan.org/address/"
}
],
"depositStatus": "launched",
"withdrawalStatus": "launched",
"confirmationCount": "45",
"withdrawalTxFee": "0.005",
"withdrawalMinAmount": "0.0001"
},
{
"name": "usdt",
"fullName": "Tether",
"withdrawalMaxAmountPerRequest": "500000",
"defaultNetwork": "TRX",
"networkList": [
{
"name": "TRX",
"fullName": "Tron",
"depositStatus": "launched",
"withdrawalStatus": "launched",
"confirmationCount": 1,
"withdrawalTxFee": "1",
"withdrawalMinAmount": "1",
"withdrawalPrecision": 6,
"hasSecondaryAddr": false,
"addressExplorerUrl": "https://tronscan.org/#/address/"
}
],
"depositStatus": "launched",
"withdrawalStatus": "launched",
"confirmationCount": "1",
"withdrawalTxFee": "1",
"withdrawalMinAmount": "1"
}
]
}
Get the current server time.
timestamp
1700000000000
curl 'https://api.korbit.co.kr/v2/time'
{
"success": true,
"data": {
"time": 1700000000000
}
}
Get the trading fee rates applied to your account.
Enter the symbols of the trading pairs to query. To input multiple trading pairs, separate them with commas(,). If omitted, information for all available trading pairs on Korbit will be returned.
btc_krw,eth_krw
Trading pair symbol
btc_krw
Fee currency for buy orders
btc
Fee currency for sell orders
krw
Maximum fee rate. For buy orders of trading pairs where buyFeeCurrency is krw, an additional amount of KRW equal to quantity*price*maxFeeRate will be required (converted to the amount in use). Once the order is executed, it will be settled according to the fee rate at the time of execution.
0.0015
Taker fee rate
0.0007
Maker fee rate
0.0003
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/tradingFeePolicy?timestamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": [
{
"symbol": "btc_krw",
"buyFeeCurrency": "btc",
"sellFeeCurrency": "krw",
"maxFeeRate": "0.0015",
"takerFeeRate": "0.0015",
"makerFeeRate": "0"
},
{
"symbol": "eth_krw",
"buyFeeCurrency": "eth",
"sellFeeCurrency": "krw",
"maxFeeRate": "0.0015",
"takerFeeRate": "0.0015",
"makerFeeRate": "0"
},
{
"symbol": "etc_krw",
"buyFeeCurrency": "krw",
"sellFeeCurrency": "krw",
"maxFeeRate": "0.0015",
"takerFeeRate": "0.0015",
"makerFeeRate": "0"
},
{
"symbol": "xrp_krw",
"buyFeeCurrency": "krw",
"sellFeeCurrency": "krw",
"maxFeeRate": "0.0015",
"takerFeeRate": "0.0015",
"makerFeeRate": "0"
}
]
}
Get current API Key's information.
API Key ID
FFSoRME97Sr7WBCMZJ_NO5Bj8MZ03EyArRzqyr1NKIA
Key Type
hmac-sha256ed25519hmac-sha256
ED25519 public key. (only for ED25519 type.)
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAk+Yp3C31eFwoky+zyRNB6rAv/lgULTeghxTQpqwQHzM=
-----END PUBLIC KEY-----
["readBalances", "readOrders"]
IP Address Whitelist
1.2.3.4,5.6.7.8
API key expiration timestamp (scheduled).
1700000000000
status of the key
activateddeactivatedactivated
label (custom name)
test key
API key creation timestamp
1700000000000
curl -H X-KAPI-KEY=APIKEY 'https://api.korbit.co.kr/v2/currentKeyInfo?timestamp=TIMESTAMP&signature=SIGNATURE'
{
"success": true,
"data": {
"apiKey": "FFSoRME97Sr7WBCMZJ_NO5Bj8MZ03EyArRzqyr1NKIA",
"type": "ed25519",
"publicKey": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAk+Yp3C31eFwoky+zyRNB6rAv/lgULTeghxTQpqwQHzM=\n-----END PUBLIC KEY-----\n",
"permissions": ["readBalances", "readOrders"],
"expiration": 1700000000000,
"status": "activated",
"label": "test key",
"createdAt": 1700000000000
}
}
The WebSocket API is a WebSocket connection interface designed for bidirectional communication between the Korbit server and user clients. Using the WebSocket API allows you to receive real-time information from the Korbit cryptocurrency exchange at the fastest possible speed.
With the REST API, users must send an HTTP request to receive a response and retrieve information. However, with the WebSocket API, a persistent, bidirectional connection is maintained between the Korbit server and user client. As a result, when events such as price changes or order executions occur, information is continuously delivered from the Korbit server to the user client in real-time. Therefore, if you aim to receive real-time information on prices, orders, and trades quickly and conveniently, we recommend using the WebSocket API over the REST API.
Data provided by the WebSocket API is classified into Public and Private types, depending on whether it is public information or specific to individual users. Public type data can be received without any authentication. However, to receive Private type data, authentication with Korbit Open API keys is required when establishing the WebSocket connection.
For Public type data, sending a subscription request via WebSocket immediately provides the latest data at the time of the request as snapshot data. (Snapshot data is not real-time.) All non-snapshot data is real-time.
There are separate WebSocket endpoints for each of the types, public and private. Please connect to the correct endpoint for the type you want to subscribe.
WebSocket Endpoint URL: wss://ws-api.korbit.co.kr/v2/public
ticker : Provides snapshots and real-time current prices for a specified trading pair.orderbook : Provides snapshots and real-time order book data for a specified trading pair.trade : Provides snapshots and real-time trade history for a specified trading pair.WebSocket Endpoint URL: wss://ws-api.korbit.co.kr/v2/private
myOrder : Provides real-time status updates on your orders.myTrade : Provides real-time execution updates on your trades.myAsset : Provides real-time updates on your assets.wss://ws-api.korbit.co.kr/v2/public
wss://ws-api.korbit.co.kr/v2/private
Public type data (Ticker, Orderbook, Trade) can be received simply by connecting to the WebSocket and sending a subscription message, without any authentication. However, to receive Private type data (My Order, My Trade), authentication using Korbit Open API keys is required upon establishing the WebSocket connection.
For authentication, as with the REST API, you need to send a request with an X-KAPI-KEY header and a signature generated using either HMAC-SHA256 or ED25519 during the WebSocket connection. Specifically, include the X-KAPI-KEY in the request header, and add timestamp and signature information to the URL query string.
Please refer to the Sign API Requests section and the attached example code for more details.
// Node.js, npm i ws
import crypto from "crypto";
import WebSocket from "ws";
const apiKey = "XyAZ_apaUv9pg4ZyGzNHTxabfIDrWIRpPBgk5-olIuM"; // API Key
const apiSecret = "ZwKS2evdxj9j3Neir2s0UHAmpNFfo4a0iHawEElGCBs"; // HMAC-SHA256 Secret Key
const wsUrl = "wss://ws-api.korbit.co.kr/v2/private"; // Private type endpoint URL
// HMAC-SHA256 Signature
const createHmacSignature = (query) => {
return crypto.createHmac("sha256", apiSecret).update(query, "utf-8").digest("hex");
};
const timestamp = Date.now(); // Timestamp (ms)
const params = new URLSearchParams({
timestamp: timestamp,
});
const signature = createHmacSignature(params.toString());
// Add Signature to params
params.append("signature", signature);
// Add API Key to the header, Open a WebSocket connection
const ws = new WebSocket(`${wsUrl}?${params.toString()}`, [], {
headers: {
"X-KAPI-KEY": apiKey,
}
});
ws.on("open", () => {
console.log("connected!");
// Send messages to subscribe
ws.send(`[{"method":"subscribe","type":"myOrder","symbols":["btc_krw","eth_krw"]},{"method":"subscribe","type":"myTrade","symbols":["btc_krw","eth_krw"]}]`);
});
ws.on("error", (error) => {
console.error('websocket error', error);
});
ws.on("message", (data) => {
const message = JSON.parse(data);
console.log(message);
});
ws.on("close", (code, message) => {
console.log("connection closed!", code, message);
});
ws.on("unexpected-response", async (request, response) => {
let data = '';
for await (const chunk of response) {
data += chunk;
}
console.log("websocket connect fail", response.statusCode, data);
if (response.headers["content-type"]?.startsWith("application/json")) {
const errorJson = JSON.parse(data)
const msg = errorJson.error?.message
// e.g.) EXCEED_TIME_WINDOW, KEY_NOT_FOUND, ...
console.log("auth error", msg)
}
});
After the WebSocket connection is established, you must send a request indicating which type of data you wish to subscribe to. In the WebSocket API, subscription request messages are sent in JSON format, with method, type, and symbols specified accordingly.
Since multiple messages can be included at once, even when sending a single request message, it must be enclosed in square brackets []. (Please note that case sensitivity applies.)
[{"method":"subscribe","type":"ticker","symbols":["btc_krw","eth_krw"]}]
[{"method":"subscribe","type":"ticker","symbols":["btc_krw","eth_krw"]},[{"method":"subscribe","type":"orderbook","symbols":["btc_krw","eth_krw"]}]]
# Using wscat in a Node.js environment
$ npm install -g wscat
$ wscat -c wss://ws-api.korbit.co.kr/v2/public
connected (press CTRL+C to quit)
# Once the WebSocket connection is established, send a data subscription request
> [{"method":"subscribe","type":"ticker","symbols":["btc_krw","eth_krw"]}]
< {"symbol":"btc_krw","timestamp":1730365099072,"type":"ticker","snapshot":true,"data":{"open":"100500000","high":"100651000","low":"100492000","close":"100650000","prevClose":"100497000","priceChange":"153000","priceChangePercent":"0.15","volume":"0.89102242","quoteVolume":"89632429.21566","bestAskPrice":"100651000","bestBidPrice":"100650000","lastTradedAt":1730356819663}}
< {"symbol":"eth_krw","timestamp":1730365099072,"type":"ticker","snapshot":true,"data":{"open":"4390000","high":"4390000","low":"4357000","close":"4357000","prevClose":"4456000","priceChange":"-99000","priceChangePercent":"-2.22","volume":"0.1702132","quoteVolume":"744416.83456","bestAskPrice":"4357000","bestBidPrice":"4324000","lastTradedAt":1730361789775}}
< {"symbol":"btc_krw","timestamp":1730365220489,"type":"ticker","data":{"open":"100501000","high":"100651000","low":"100501000","close":"100650000","prevClose":"100492000","priceChange":"158000","priceChangePercent":"0.16","volume":"0.81866504","quoteVolume":"82360867.25161","bestAskPrice":"100651000","bestBidPrice":"100650000","lastTradedAt":1730356819663}}
In the example, a subscription request is sent to receive current price (ticker) information for the Bitcoin (btc_krw) and Ethereum (eth_krw) trading pairs. First, snapshot data is received, followed by a continuous stream of real-time data. If you want to receive information for multiple trading pairs, enclose the pairs in square brackets [] and separate them with commas ,, as shown in the example above.
To subscribe, set method to subscribe; to stop receiving a specific type of data, set method to unsubscribe to cancel the subscription.
Refer below for example subscription request and response messages for each type.
There are two kinds of messages sent from the server.
Messages without status field are real-time data, which can be subscribed using the subscribe request message.
{"type": "type of the message", ...}
{"type": "ticker", "timestamp": 1700000027754, "symbol": "btc_krw", "data": {...}}
Messages with status field are control messages, which are sent by the server to notify results or errors.
{"status": "success", "requestId": 1}
{"status": "fail", "requestId": 2, "code": "..."}
{"status": "error", "message": "..."}
By default, no responses will be sent when subscribe/unsubscribe requests succeed, and only failure responses are sent.
In case you want to check the result for each requests, you can set a unique integer to the requestId field of the request message, and a response message with the same requestId will always be sent, even if it succeedes.
Request:
[{"requestId": 1, "method": "subscribe", "type": "myOrder", "symbols": ["btc_krw", "eth_krw"]}]
Response:
{"requestId": 1, "status": "success"}
{"requestId": 1, "status": "fail", "code": "INVALID_SYMBOL"}
Streams latest pricing information for a symbol.
Set to subscribe or unsubscribe
Set to ticker
Enter the symbols of the trading pairs you want to query.
["btc_krw","eth_krw"]
Fixed value ticker
Server time (unix timestamp, in milliseconds)
1700000000000
Trading pair symbol
btc_krw
Whether the data is a snapshot or a real-time data.
true - The data is a latest snapshot and not a real-time data. Sent as the first message on subscription.
false or null - The data is from a real-time trade.
Open price (24H)
361922.23
High price (24H)
361922.23
Low price (24H)
361922.23
Last price (24H)
361922.23
Previous close price (24H)
261922.23
changed price. prevClose - close
261922.23
changed price percent. 100 * (prevClose - close) / prevClose
10
Trading volume (Base, 24H)
100
Trading volume (Quote/Counter, 24H)
1000000000
Best bid price
5000
Best ask price
6000
Last traded timestamp (unix timestamp, in milliseconds)
1700000000000
[{"method":"subscribe","type":"ticker","symbols":["btc_krw","eth_krw"]}]
{
"type": "ticker",
"timestamp": 1700000027754,
"symbol": "btc_krw",
"snapshot": true,
"data": {
"open": "94679000",
"high": "111162000",
"low": "93861000",
"close": "99027000",
"prevClose": "94679000",
"priceChange": "4348000",
"priceChangePercent": "4.59",
"volume": "147.94385655",
"quoteVolume": "14311735005.18033",
"bestAskPrice": "99027000",
"bestBidPrice": "99026000",
"lastTradedAt": 1700000010022
}
}
Streams orderbook data for a symbol. Up to 30 prices are available for each side.
Set to subscribe or unsubscribe
Set to orderbook
Enter the symbols of the trading pairs you want to query.
["btc_krw","eth_krw"]
Fixed value orderbook
Server time (unix timestamp, in milliseconds)
1700000000000
Trading pair symbol
btc_krw
Whether the data is a snapshot or a real-time data.
true - The data is a latest snapshot and not a real-time data. Sent as the first message on subscription.
false or null - The data is from a real-time trade.
Timestamp of the orderbook data (unix timestamp, in milliseconds)
1700000000000
bids
price
250000
quantity
10
asks
price
250000
quantity
10
[{"method":"subscribe","type":"orderbook","symbols":["btc_krw"]}]
{
"type": "orderbook",
"timestamp": 1700000006177,
"symbol": "btc_krw",
"snapshot": true,
"data": {
"timestamp": 1700000000234,
"asks": [
{
"price": "99131000",
"qty": "0.00456677"
},
{
"price": "99132000",
"qty": "0.00616665"
},
{
"price": "99133000",
"qty": "0.00808569"
}
],
"bids": [
{
"price": "99120000",
"qty": "0.00363422"
},
{
"price": "99119000",
"qty": "0.00475577"
},
{
"price": "99118000",
"qty": "0.00389054"
}
]
}
}
Streams real-time trades.
Set to subscribe or unsubscribe
Set to trade
Enter the symbols of the trading pairs you want to query.
["btc_krw","eth_krw"]
Fixed value trade
Server time (unix timestamp, in milliseconds)
1700000000000
Trading pair symbol
btc_krw
Whether the data is a snapshot or a real-time data.
true - The data is a latest snapshot and not a real-time data. Sent as the first message on subscription.
false or null - The data is from a real-time trade.
Time of the trade (unix timestamp, in milliseconds)
1700000000000
trade price
250000
trade quantity
10
whether the taker is the buyer.
true
trade ID (unique for each currency pair)
1234
[{"method":"subscribe","type":"trade","symbols":["btc_krw"]}]
{
"symbol": "btc_krw",
"timestamp": 1700000005498,
"type": "trade",
"snapshot": true,
"data": [
{
"timestamp": 1700000001239,
"price": "98909000",
"qty": "0.00146702",
"isBuyerTaker": true,
"tradeId": 123456
}
]
}
Streams the changes in my orders.
Set to subscribe or unsubscribe
Set to myOrder
Enter the symbols of the trading pairs you want to query.
["btc_krw","eth_krw"]
Fixed value myOrder
Server time (unix timestamp, in milliseconds)
1700000000000
Trading pair symbol
btc_krw
order ID
1234
Order status
pending Order pending. If the balance is insufficient, the order may fail and change to the expired status.unfilled Fully unfilled (Same as the open status from REST API)filled Fully executedcanceled Fully canceledpartiallyFilled Partially filledpartiallyFilledCanceled Partially filled and remaining amount canceledexpired Order submission failedpartiallyFilled
buysellbuy
limit limit ordermarket market orderbest best bid/offerlimit
Time in Force strategies.
gtc Good-Till-Canceled. The order will remain valid until terminated (fully executed or canceled)ioc Immediate-Or-Cancel. The order will be filled immediately, if can not then will be canceled. (Taker-Only)fok Fill-Or-Kill. The order will be filled fully, if can not then will be canceled. (Taker-Only)po Post-Only. If the order would be filled immediately, then will be canceled. (Maker-Only)gtc
Order price (limit order only. no price for market order.)
5000
Order quantity (limit/BBO order or sell-side market order only. For BBO orders it's set after the quantity is determined)
10
filled quantity
10
Purchase amount in counter/quote asset like KRW. (buy-side market/BBO order only)
50000
Filled amount in counter/quote asset like KRW.
50000
Average execution price
5000
Order timestamp (ms)
1700000000000
Last execution timestamp (ms)
1700000000000
clientOrderId submitted from the user by POST /v2/orders
20141231-155959-abcdef
[{"method":"subscribe","type":"myOrder","symbols":["btc_krw"]}]
{
"symbol": "btc_krw",
"timestamp": 1700000000000,
"channelType": "myOrder",
"order": {
"orders": [
{
"orderId": 123456,
"status": "partiallyFilled",
"side": "buy",
"orderType": "limit",
"timeInForce": "gtc",
"price": "99017000",
"qty": "0.9",
"filledQty": "0.53793136",
"amt": "89115300",
"filledAmt": "53260583.9536",
"avgPrice": "99010000",
"createdAt": 1700000001000,
"lastFilledAt": 1700000002000,
"clientOrderId": "tjcfiDfSjq94giNAat31"
}
]
}
}
Streams trades on my orders.
Set to subscribe or unsubscribe
Set to myTrade
Enter the symbols of the trading pairs you want to query.
["btc_krw","eth_krw"]
Fixed value myTrade
Server time (unix timestamp, in milliseconds)
1700000000000
Trading pair symbol
btc_krw
trade ID
1234
order ID
1234
buysellbuy
price
5000
quantity
10
fee quantity
10
fee currency
krw
time of the trade
1700000000000
taker=true, maker=false
true
[{"method":"subscribe","type":"myTrade","symbols":["btc_krw"]}]
{
"symbol": "btc_krw",
"timestamp": 1700000001000,
"channelType": "myTrade",
"trade": {
"trades": [
{
"tradeId": 123456,
"orderId": 456789,
"side": "buy",
"price": "99051000",
"qty": "0.0013",
"fee": "50",
"feeCurrency": "krw",
"filledAt": 1700000000000,
"isTaker": true
}
]
}
}
Streams changes to my balances in real time.
Set to subscribe or unsubscribe
Set to myAsset
Fixed value myAsset
Server time (unix timestamp, in milliseconds)
1700000000000
asset name
krw
balance. available + tradeInUse + withdrawalInUse
100
available quantity
70
quantity in trade
20
quantity in withdrawal
10
average purchase price
5000
time of the last change
1700000000000
[{"method":"subscribe","type":"myAsset"}]
{
"timestamp": 1700000001000,
"channelType": "myAsset",
"asset": {
"assets": [
{
"currency": "btc",
"balance": "10",
"available": "7",
"tradeInUse": "2",
"withdrawalInUse": "1",
"avgPrice": "50000",
"updatedAt": 1700000000000
},
{
"currency": "eth",
"balance": "100",
"available": "70",
"tradeInUse": "20",
"withdrawalInUse": "10",
"avgPrice": "5000",
"updatedAt": 1700000000000
}
]
}
}