upbit-api is an API that makes Upbit OpenAPI easy to use.
This api will support the Restful API and Websocket API.
It was created with Typescript and compiled into es2017.
The § symbol includes auto-update:
autoMarketUpdate or autoOrderBookUpdate
WS is WebSocket.
Method
Upbit
upbit-api
version
GET
/ticker
ticker §
0.0.1+
GET
/orderbook
orderBook §
0.2.0+
GET
/trades/ticks
ticks
0.5.0+
GET
/candles/minutes/unit
candlesMinutes
0.6.0+
GET
/market/all
allMarket
0.7.0+
GET
/candles/days
candlesDay
0.9.0+
GET
/candles/weeks
candlesWeek
0.10.0+
GET
/candles/months
candlesMonth
0.10.0+
GET
/accounts
Unsupported
At least 0.11.0
GET
/orders/chance
Unsupported
At least 0.11.0
GET
/order
Unsupported
At least 0.11.0
GET
/orders
Unsupported
At least 0.11.0
POST
/orders
Unsupported
At least 0.11.0
DELETE
/order
Unsupported
At least 0.11.0
GET
/withdraws
Unsupported
At least 0.11.0
GET
/withdraw
Unsupported
At least 0.11.0
GET
/withdraws/chance
Unsupported
At least 0.11.0
POST
/withdraws/coin
Unsupported
At least 0.11.0
POST
/withdraws/krw
Unsupported
At least 0.11.0
GET
/deposits
Unsupported
At least 0.11.0
WS
ticker
Unsupported
At least 0.11.0
WS
trade
Unsupported
At least 0.11.0
WS
orderbook
Unsupported
At least 0.11.0
Create new Market object arrays.
Parameter
Type
Description
market
string or Array<string>
'KRW-BTC' or ['KRW-BTC', 'KRW-XRP']
Parameter
Type
Description
market
string
ex) KRW, BTC, USDT ...
coin
string
ex) BTC, ETH, XRP ...
marketCode
string
ex) KRW-BTC, KRW-XRP ...
tradeTime
Date
trade time
price
number
price
open
number
Market value
high
number
Highest price
low
number
Lowest price
prevClose
number
the closing price of the previous day
change
number
EVEN: Mixture RISE: Rise FALL: Fall
changePrice
number
Absolute value of change amount
changeRate
number
Absolute value of change rate
signedChangePrice
number
signed change Price
signedChangeRate
number
signed change rate
tradeVolume
number
Latest volume
accTradePrice
number
accTradePrice
accTradePrice24
number
accTradePrice24
accTradeVolume
number
Cumulative transaction amount(UTC 0)
accTradeVolume24
number
Cumulative transaction amount for 24 hours
high52wPrice
number
52 Weeks New Highest Price
high52wDate
Date
52 Weeks New Highest Price'Date
low52wPrice
number
52 Weeks New Lowest Price
low52wDate
Date
52 Weeks New Lowest Price's Date
lastUpdate
Date
The time when this object updated
autoMarketUpdate(market, time , errorHandler, callback?)
Updates object market every specified time time.
Parameter
Type
Description
market
Market or Array<Market>
Market object that will be updated.
time
number
Frequency to update (in milliseconds)
errorHandler
function, (error) => any
error handler
callback
function, (market) => any
optional, this function called when object updated.
Create new OrderBook object arrays.
Parameter
Type
Description
market
string or Array<string>
'KRW-BTC' or ['KRW-BTC', 'KRW-XRP']
Name
Type
Description
market
string
ex) KRW, BTC, USDT ...
coin
string
ex) BTC, ETH, XRP ...
marketCode
string
ex) KRW-BTC, KRW-XRP ...
lastUpdate
Date
The time when this object updated
askList
Array<Order>
Ask order list
bidList
Array<Order>
Bid order list
totalAsk
number
total ask
totalBid
number
total bid
Name
Type
Description
price
number
price of order
size
number
size of order
autoOrderBookUpDate(orderBook, time , errorHandler, callback?)
Updates object OrderBook every specified time time.
Parameter
Type
Description
orderBook
OrderBook or Array<OrderBook>
OrderBook object that will be updated.
time
number
Frequency to update (in milliseconds)
errorHandler
function, (error) => any
error handler
callback
function, (orderBook) => any
optional, this function called when object updated.
ticks(market, count?, to?, cursor?)
Create new Trade object arrays.
Parameter
Type
Description
market
string or Array<string>
'KRW-BTC' or ['KRW-BTC', 'KRW-XRP']
count
number
count
to
string
HHmmss or HH:mm:ss
cursor
number
sequential_id
Name
Type
Description
market
string
ex) KRW, BTC, USDT ...
coin
string
ex) BTC, ETH, XRP ...
marketCode
string
ex) KRW-BTC, KRW-XRP ...
lastUpdate
Date
The time when this object updated
tradeTime
Date
The time when traded
price
number
price of this trade
volume
number
volume of this trade
prev_closing_price
number
prev_closing_price
change_price
number
price - prev_closing_price
isAsk
boolean
Trade type
sequential_id
number
Transaction Number(Unique)
candlesMinutes(market, unit?, count?, to?)
Create Candle object arrays.
Parameter
Type
Description
market
string or Array<string>
'KRW-BTC' or ['KRW-BTC', 'KRW-XRP']
unit
number
1, 3, 5, 15, 10, 30, 60, 240
count
number
count
to
string
yyyy-MM-dd'T'HH:mm:ssXXX
Name
Type
Description
market
string
ex) KRW, BTC, USDT ...
coin
string
ex) BTC, ETH, XRP ...
marketCode
string
ex) KRW-BTC, KRW-XRP ...
timestamp
number
The time at which the last tick was stored in the candle.
candleDateTimeUTC
Date
Standard time of the candle (UTC basis)
candleDateTimeKST
Date
Standard time of the candle (KST basis)
open
number
Market value
high
number
Highest price
low
number
Lowest price
accTradePrice
number
Candle's accTradePrice
accTradeVolume
number
Candle's cumulative transaction amount
lastUpdate
Date
The time when this object updated
MinutesCandle extends Candle
Name
Type
Description
unit
number
minutes. Possible values: 1, 3, 5, 15, 10, 30, 60, 240
DayCandle extends Candle
Name
Type
Description
prevClosingPrice
number
the closing price of the previous day
convertedTradePrice
number
a price converted into denominations
changePrice
number
value of change amount
changeRate
number
value of change rate
WeekMonthCandle extends Candle
Name
Type
Description
firstDayOfPeriod
number
first day of period
List of markets that can be traded at Upbit.
Name
Type
Description
market
string
Market information provided by Upbit, ex) BTC-XRP
korean_name
string
Korean name ex) 비트코인
english_name
string
English name ex) Bitcoin