NAV
cURL

Introduction

GDAC aims to bring about innovation in Finance using Blockchain Technology.

In order to create synergy with our partners, we offer partners exclusive API access that gives programmatic control over:

Revision History

Version Date (dd/mm/yyyy) Changes
0.1 02/02/2019 Initial Commit
0.2 13/02/2019 Update authentication method with api key, secret key
0.3 28/02/2019 Update API docs - Market Data, Account, Order, Trade
0.4 05/03/2019 Order Price Unit: it depends on the order price rather than current price
List Open Orders: added Status parameter
Ticker: removed Ask, Bid from response
Cancel Order: remove pair from request parameter
API endpoint: Version prefix of all API endpoints changed to v0.4

General

Rate Limit

In order to provide a stable API service, requests that exceed the rate limit within a short period of time are not allowed. Partner API users can make up to 4 requests per second.

When a rate limit is exceeded, a status of 429 Too Many Requests will be returned.

Datetime Format

All timestamps are returned in ISO 8601 format(UTC). Example: "2019-02-26T14:57:04Z"

Endpoint URL

Environment Base URL
production https://partner.gdac.com

Request URL needs to be determined by Base and specific endpoint combination.

Error

{
  "code": "ERROR CODE"
}

Any endpoint can return an ERROR

Order Price Unit

The order price should be a multiple of the order price unit. The order price unit depends on the price at which you want to order.

<= Order Price Order Price < Order Price Unit
0 0.00001 0.00000001
0.00001 0.00005 0.00000005
0.00005 0.0001 0.0000001
0.0001 0.0005 0.0000005
0.0005 0.001 0.000001
0.001 0.005 0.000005
0.005 0.01 0.00001
0.01 0.05 0.00005
0.05 0.1 0.0001
0.1 0.5 0.0005
0.5 10 0.001
10 100 0.01
100 1000 0.1
1000 5000 1
5000 10000 5
10000 100000 10
100000 500000 50
500000 1000000 100
1000000 2000000 500
2000000 1000

Authentication

All API calls require an authentication token in the header.

Creating an authentication token

The authentication token follows JWT format and HS256 is recommended for signing.

JWT Payload Format

{
  "api_key": "api:ak:{API Key}",
  "nonce": "current timestamp in ISO 8601 format"
}

Payload contains api key and nonce. api_key should begin with the prefix "api:ak:". nonce should not differ by more than 10 seconds from the current time on the server.

Creating a JWT Signature

const jwt = require("jsonwebtoken");

const payload = {
  api_key: "THIS_IS_API_KEY",
  nonce: "2019-02-13T08:10:13Z"
};

const jwtToken = jwt.sign(payload, "THIS_IS_SECRET_KEY");

Create a JWT Signature using the payload and secret key.

Creating a request with an authentication token

Authorization: Bearer "JWT Token"

When making a new request, you must insert a JWT Token into your Request Header.

api_key and secret_key Issuance method

We will provide an access_token to each partner company.

HTTP GET Example in Python with API Key

#!/usr/bin/env python3.6
import datetime
import requests
import logging
import jwt


logging.basicConfig(level=logging.DEBUG)


if __name__ == '__main__':
    API_KEY = 'API_KEY'
    SECRET = 'SECRET'

    payload = {
        'api_key': "api:ak:" + API_KEY,
        'nonce': datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
    }

    jwtToken = jwt.encode(payload, SECRET, 'HS256')
    headers = {'Authorization': 'Bearer '+jwtToken.decode('utf-8')}
    r = requests.get("https://partner.gdac.com/v0.4/balance", headers=headers)

    print('Request')
    print(r.request.headers)
    print('Response')
    print(r.status_code)
    print(r.headers)
    print(r.content)

Market Data

Pairs

Request URI

curl https://partner.gdac.com/v0.4/public/pairs

Response Body

[
  {
    "pair": "BTC/KRW",
    "base_currency": "KRW",
    "quote_currency": "BTC",
    "quote_order_unit": "0.00010000",
    "fee_rate_taker": "0.001",
    "fee_rate_maker": "0.001"
  },
  {
    "pair": "ETH/KRW",
    "base_currency": "KRW",
    "quote_currency": "ETH",
    "quote_order_unit": "0.00010000",
    "fee_rate_taker": "0.001",
    "fee_rate_maker": "0.001"
  }
]

Get a list of available currency pairs for trading.

HTTP Request

GET /v0.4/public/pairs

Request Param

N/A

Response Body

Field Name Type Description
array Array of currency pairs
pair string Pair identifier
base_currency string Name of base currency
quote_currency string Name of quote currency
quote_order_unit string Minimum order unit for quote; order quantity should be a multiple of this unit.
fee_rate_taker string fee rate for taker
fee_rate_maker string fee rate for maker

Please refer to Order Price Unit to get the minimum order price.

Ticker

Request URI

curl https://partner.gdac.com/v0.4/public/tickers/BTC%2FKRW

Response Body

{
  "pair": "BTC/KRW",
  "last": "4251000",
  "open": "4213000",
  "low": "4202000",
  "high": "4271000",
  "volume": "247.52648136",
  "dtime": "2019-03-01T11:00:00Z"
}

Get market ticker for a trading pair.

HTTP Request

GET /v0.4/public/tickers/{pair}

Request Param

Parameter Name Required Description Example
pair Y Pair identifier BTC/KRW

Response Body

Field Name Type Description
pair string Pair identifier
last string Last trade price
open string Last trade price 24 hours ago
low string Lowest trade price for 24 hours
high string Highest trade price for 24 hours
volume string Total trade volume for 24 hours
dtime string Ticker timestamp

Tickers

Request URI

curl https://partner.gdac.com/v0.4/public/tickers

Response Body

[
  {
    "pair": "BTC/KRW",
    "last": "4251000",
    "open": "4213000",
    "low": "4202000",
    "high": "4271000",
    "volume": "247.52648136",
    "dtime": "2007-03-01T11:00:00Z"
  },
  {
    "pair": "ETH/KRW",
    "last": "4720",
    "open": "4705",
    "low": "4505",
    "high": "4720",
    "volume": "25351.20553302",
    "dtime": "2007-03-01T11:00:00Z"
  }
]

Get market ticker for all trading pairs.

HTTP Request

GET /v0.4/public/tickers

Response Body

Returns an array of ticker response.

Trades

Request URI

curl https://partner.gdac.com/v0.4/public/trades?pair=BTC%2FKRW&offset=2019-02-28T01%3A12%3A31Z&limit=100

Response Body

[
  {
    "pair": "BTC/KRW",
    "side": "S",
    "price": "4252000.00000000",
    "quantity": "3.51234406",
    "trade_dtime": "2019-02-27T06:29:56Z"
  },
  {
    "pair": "BTC/KRW",
    "side": "S",
    "price": "4251000.00000000",
    "quantity": "1.93214406",
    "trade_dtime": "2019-02-27T06:29:54Z"
  }
]

Get the latest trades for a trading pair. The trade list is returned in descending order.

HTTP Request

GET /v0.4/public/trades

Request Param

Parameter Name Required Description Example
pair Y Pair identifier BTC/KRW
offset N Timestamp in datetime format. If assigned, a list of trades older than offset is returned 2019-02-28T01:12:31Z
limit N default: 50 50

Response Body

Field Name Type Description
array Array of latest trades
pair string Pair identifier
side string Trade side; S: Sell, B: Buy
price string Trade price
quantity string Trade quantity
trade_dtime string Trade timestamp

Orderbook

Request URI

curl https://partner.gdac.com/v0.4/public/orderbook?pair=BTC%2FKRW

Response Body

{
  "ask": [
    {
      "price": "4372000",
      "volume": "0.18566022"
    },
    {
      "price": "4373000",
      "volume": "0.01586508"
    }
  ],
  "bid": [
    {
      "price": "4233000",
      "volume": "0.00800000"
    },
    {
      "price": "4227000",
      "volume": "19.62506668"
    }
  ]
}

Get a list of open orders for a trading pair. It returns the 50 best bid/asks

HTTP Request

GET /v0.4/public/orderbook

Request Param

Parameter Name Required Description
pair Y Pair identifier

Response Body

Field Name Type Description
ask array Sell side array of price levels
bid array Buy side array of price levels
price string Price level
volume string Total volume of orders at specified price level

Currencies

Request URI

curl https://partner.gdac.com/v0.4/public/currencies

Response Body

[
  {
    "currency": "BTC",
    "name": "Bitcoin",
    "precision": "8"
  },
  {
    "currency": "ETC",
    "name": "Ethereum",
    "precision": "8"
  }
]

Return a list of all currencies and their decimal precision.

HTTP Request

GET /v0.4/public/currencies

Request Param

N/A

Response Body

Field Name Type Description
array Array of currencies
currency string Currency identifier
name string Currency name
precision string Currency precision (in decimals). Currently 8 for all assets

Account

Balance

Request URI

curl https://partner.gdac.com/v0.4/balance

Response Body

[
  {
    "currency": "BTC",
    "balance": "0.18566022",
    "available": "0.13166022"
  },
  {
    "currency": "ETH",
    "balance": "0.01586508",
    "available": "0.00800000"
  }
]

Get account info about available and total balance for each currency.

HTTP Request

GET /v0.4/balance

Request Param

Parameter Name Required Description Example
currency N Currency identifier BTC

Response Body

Field Name Type Description
array Array of currency balances
currency string Currency identifier
balance string Total balance for currency
available string Funds available (withdrawal/trading) for currency

Order

Place a new Order

Request URI

curl -d '{"pair":"BTC/KRW","side":"B","price":"1000.000","quantity":"10.1021"}'  -H "Content-Type: application/json" -X POST https://partner.gdac.com/v0.4/orders

Response Body

{
  "pair": "BTC/KRW",
  "order_id": "1902270000000030060"
}

Place a new buy or sell order.

HTTP Request

POST /v0.4/orders

Request Body

Field Name Required Description
pair Y Pair identifier
side Y Order type (buy or sell) "B":Buy, "S":Sell)
price Y Price at which you wish to buy/sell
quantity Y Quantity you wish to buy/sell

Response Body

Field Name Type Description
pair Y Pair identifier
order_id string Order identifier

Cancel an order

Request URI

curl -X DELETE https://partner.gdac.com/v0.4/api/orders?order_id=1901323000111044636

Response Body

{
  "pair": "BTC/KRW",
  "order_id": "1902270000000030060"
}

Cancel an open buy or sell order.

HTTP Request

DELETE /v0.4/orders

Request Param

Parameter Name Required Description
order_id Y Order identifier

Response Body

Field Name Type Description
pair string Pair identifier
order_id string Order identifier

Get Order Status

Request URI

curl https://partner.gdac.com/v0.4/orders/1902270000000030060

Response Body

{
  "pair": "BTC/KRW",
  "order_id": "1902270000000030060",
  "status": "P",
  "price": "1000.0000",
  "quantity": "10.1021",
  "open_quantity": "7.8712",
  "created_dtime": "2019-03-01T11:00:00Z"
}

Get a single order by order id.

HTTP Request

GET /v0.4/orders/{order_id}

Request Param

Parameter Name Required Description
order_id Y Order identifier

Response Body

Field Name Type Description
pair string Pair identifier
order_id string Order identifier
status string O:Open, P:PartiallyFilled, F:Filled, C:Canceled
side string Order type (buy or sell). "B":Buy, "S":Sell
price string Price at which you wish to buy/sell
quantity string Quantity you wish to buy/sell
open_quantity string Remaining amount waiting to be filled.
created_dtime string Order creation time

List Open Orders

Request URI

curl https://partner.gdac.com/v0.4/orders?pair=BTC%2FKRW&offset=2019-02-28T01%3A12%3A31Z&limit=100

Response Body

[
  {
    "pair": "BTC/KRW",
    "order_id": "1902270000000030060",
    "status": "P",
    "price": "1000.0000",
    "quantity": "10.1021",
    "open_quantity": "7.8712",
    "created_dtime": "2019-03-01T11:00:00Z"
  },
  {
    "pair": "BTC/KRW",
    "order_id": "1902270000000030059",
    "status": "P",
    "price": "950.0000",
    "quantity": "12.8182",
    "open_quantity": "0.8712",
    "created_dtime": "2019-03-01T10:31:00Z"
  }
]

Get a list of the user's open orders.

HTTP Request

GET /v0.4/orders

Request Param

Parameter Name Required Description
pair N Pair identifier
offset N Timestamp in datetime format. If assigned, a list of orders older than offset is returned
limit N default: 50
status N Status filter. Can be combined with the following~ O:Open, P:PartiallyFilled, C:Canceled. i.e. "OP". If not specified, a list of all open orders is returned

Response Body

Field Name Type Description
array Array of orders
pair string Pair identifier
order_id string Order identifier
status string O:Open, P:PartiallyFilled, C:Canceled
side string Order type (buy or sell) "B":Buy, "S":Sell)
price string Price at which you wish to buy/sell
quantity string Quantity you wish to buy/sell
open_quantity string Remaining amount waiting to be filled. If side is "B", then open_quantity is in base_currency units, otherwise open_quantity is in quote_currency units.
created_dtime string Order creation time

Trade

Trade History

Request URI

curl https://partner.gdac.com/v0.4/trades?pair=BTC%2FKRW&offset=2019-02-28T01%3A12%3A31Z&limit=100

Response Body

[
  {
    "pair": "BTC/KRW",
    "trade_id": "1902270000000022289",
    "order_id": "1902270000000030059",
    "side": "S",
    "price": "4252000.00000000",
    "quantity": "3.51234406",
    "trade_dtime": "2019-02-27T06:29:56Z",
    "fee": "14934.00000000",
    "fee_currency": "KRW",
    "type": "M"
  },
  {
    "pair": "BTC/KRW",
    "trade_id": "1902270000000022287",
    "order_id": "1902270000000030053",
    "side": "S",
    "price": "4251000.00000000",
    "quantity": "1.93214406",
    "trade_dtime": "2019-02-27T06:29:54Z",
    "fee": "8213.00000000",
    "fee_currency": "KRW",
    "type": "M"
  }
]

Get a list of a user's trades.

HTTP Request

GET /v0.4/trades

Request Param

Parameter Name Required Description
pair Y Pair identifier
offset N Timestamp in datetime format. If assigned, a list of trades older than offset is returned
limit N default: 50

Response Body

Field Name Type Description
array Array of trades
pair string Pair identifier
trade_id string Trade identifier
order_id string Order identifier
side string Order type (buy or sell) "B":Buy, "S":Sell)
price string Price at which you wish to buy/sell
quantity string Quantity you wish to buy/sell
trade_dtime string Time of the trade
fee string Fee for transaction, withdrawal, etc.
fee_currency string Currency identifier for fee
type string M:Maker, T:Taker

Wallets

Transfers

Request URI

curl https://partner.gdac.com/v0.4/wallets/transfers

Response Body

[
    {
        "trans_txid": "0x0000847e9e838c7f9a389aaf2a2c7b2e3b70eb13b03eee83d2853ce179d83eb1",
        "trans_id": "2123123",
        "trans_dtime": "2023-10-10T01:23:45Z",
        "trans_type": "D",
        "url": "https://etherscan.io/tx/",
        "from_addr": "0x12345b0372a2b9d1b6c368168a668d2068a616b1",
        "asset": "ETH",
        "description": "",
        "trans_state": "5",
        "admin_memo": null,
        "trans_quantity": "0.56700000",
        "confirm_status": "completed",
        "confirm_dtime": "2023-10-10T02:34:56Z",
        "confirm_count": "7/3"
    }
]

Get account transfer(transaction) history.

HTTP Request

GET /v0.4/wallets/transfers

Request Param

Parameter Name Required Description Example
offset Y Offset 15
count Y Number of transaction to load 20
asset N Currency identifier BTC

Response Body

Field Name Type Description
array Array of all transfers matching request condition
trans_txid string TXID on the blockchain network
trans_id string transaction identifier (inside GDAC)
trans_dtime string transaction time in ISO format
trans_type string transaction type
url string explorer url (if exists)
from_addr string from address
asset string currency identifier
description string additional comment
trans_state string 1: requested, 5: completed, 8: failure, 9: user cancelled, ...
admin_memo string admin memo, comment
trans_quantity string transaction amount
confirm_status string block confirmation status
confirm_dtime string transaction confirm time in ISO format
confirm_count string block confirmation count

Transfer Status

Request URI

curl https://partner.gdac.com/v0.4/wallets/transfers/status

Response Body

[
    {
        "trans_txid": "0x0000847e9e838c7f9a389aaf2a2c7b2e3b70eb13b03eee83d2853ce179d83eb1",
        "trans_id": "2123123",
        "trans_dtime": "2023-10-10T01:23:45Z",
        "trans_type": "D",
        "url": "https://etherscan.io/tx/",
        "from_addr": "0x12345b0372a2b9d1b6c368168a668d2068a616b1",
        "asset": "ETH",
        "description": "",
        "trans_state": "5",
        "admin_memo": null,
        "trans_quantity": "0.56700000",
        "confirm_status": "completed",
        "confirm_dtime": "2023-10-10T02:34:56Z",
        "confirm_count": "7/3"
    }
]

Get account transfer(transaction) status.

HTTP Request

GET /v0.4/wallets/transfers/status

Request Param

Parameter Name Required Description Example
trans_id Y Transfer ID 10123
asset N Currency identifier BTC
count N Number of transaction to load status 20

Response Body

Field Name Type Description
array Array of one requested transfer information
trans_txid string TXID on the blockchain network
trans_id string transaction identifier (inside GDAC)
trans_dtime string transaction time in ISO format
trans_type string transaction type
url string explorer url (if exists)
from_addr string from address
asset string currency identifier
description string additional comment
trans_state string 1: requested, 5: completed, 8: failure, 9: user cancelled, ...
admin_memo string admin memo, comment
trans_quantity string transaction amount
confirm_status string block confirmation status
confirm_dtime string transaction confirm time in ISO format
confirm_count string block confirmation count

Withdrawal Address List

Request URI

curl https://partner.gdac.com/v0.4/wallets/crypto/withdrawal/accounts

Response Body

[
  {
      "wda_id": "1234",
      "asset": "ETH",
      "name": "TESTADDR",
      "address": "0x0000000000000000000000000000000000000000"
  },
  {
      "wda_id": "1235",
      "asset": "ETH",
      "name": "TESTADDR2",
      "address": "0x0000000000000000000000000000000000000001"
  }
]

Get a list of address registered for withdrawal.

HTTP Request

GET /v0.4/wallets/crypto/withdrawal/accounts

Request Param

Parameter Name Required Description Example
asset Y Currency identifier ETH

Response Body

Field Name Type Description
array Array of withdrawal address
wda_id string address identifier
asset string currency identifier
name string user-registered alias of address
address string actual wallet address

Withdraw Asset

Request URI

curl https://partner.gdac.com/v0.4/wallets/crypto/withdraw

Response Body

{
    "trans_id": "2915448",
    "auth": {
        "success": "Y"
    }
}

Get a list of address registered for withdrawal.

HTTP Request

POST /v0.4/wallets/crypto/withdraw

Request Param

Parameter Name Required Description Example
asset Y Currency identifier ETH
quantity Y amount of asset to withdraw 0.1235
wda_id N wda_id of address to withdraw. Can check wda_id on withdrawal/accounts API. Not necessary when asset is KRW 1101
memo_id N Withdrawal memo/destination tag/etc. should specfy when required 1234

Response Body

Field Name Type Description
trans_id string withdrawal transaction identifier (inside GDAC)
auth object auth information
success string Y if request was successful

Check Balance DEPRECATED

Retrieves balance and open order (buy/sell) information.

Request URI

https://partner.gdac.com/v0.4/api/wallets/balances?market=KRW

Response Body

{
  "code": "0",
  "data": {
    "base_asset": {
      "asset": "KRW",
      "quantity": "258719.00000000",
      "order_available": "0.00000000",
      "order_open": {
        "sell": "0.00000000",
        "buy": "0.00000000"
      }
    },
    "cryptos": [
      {
        "asset": "BTC",
        "quantity": "0.02125590",
        "avg_buy_price": "1341109.99769476",
        "order_available": "0.02125590",
        "order_open": {
          "sell": "0.00000000",
          "buy": "0.67571382"
        }
      }
    ],
    "open_order": [
      {
        "asset": "BCH",
        "sell": 0,
        "buy": 0,
        "markets": ["KRW"]
      }
    ]
  }
}

HTTP Request

GET https://partner.gdac.com/v0.4/api/wallets/balances

Request params

Parameter Type Required Description
market String Y currently supported markets are 'KRW' and 'GT'

Response Body

Field Type Description
base_asset, crypto asset String name of unit
quantity String KRW/asset quantity owned
avg_buy_price String avg. buy price
order_available String maximum order quantity
order_open String no. of open buy/sell orders
open_order asset String name of unit
sell Number no. of sell orders
buy Number no. of buy orders
markets String name of market