ua
upbit-api
npm i upbit-api
ua

upbit-api

This is an API that makes Upbit OpenAPI easy to use.

by Shin-JaeHeon

0.10.4 (see all)License:MITTypeScript:Not Found
npm i upbit-api
Readme

upbit-api

npm npm npm npm npm npm npm

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.

Coverage Table

The § symbol includes auto-update: autoMarketUpdate or autoOrderBookUpdate

WS is WebSocket.

MethodUpbitupbit-apiversion
GET/tickerticker §0.0.1+
GET/orderbookorderBook §0.2.0+
GET/trades/ticksticks0.5.0+
GET/candles/minutes/unitcandlesMinutes0.6.0+
GET/market/allallMarket0.7.0+
GET/candles/dayscandlesDay0.9.0+
GET/candles/weekscandlesWeek0.10.0+
GET/candles/monthscandlesMonth0.10.0+
GET/accountsUnsupportedAt least 0.11.0
GET/orders/chanceUnsupportedAt least 0.11.0
GET/orderUnsupportedAt least 0.11.0
GET/ordersUnsupportedAt least 0.11.0
POST/ordersUnsupportedAt least 0.11.0
DELETE/orderUnsupportedAt least 0.11.0
GET/withdrawsUnsupportedAt least 0.11.0
GET/withdrawUnsupportedAt least 0.11.0
GET/withdraws/chanceUnsupportedAt least 0.11.0
POST/withdraws/coinUnsupportedAt least 0.11.0
POST/withdraws/krwUnsupportedAt least 0.11.0
GET/depositsUnsupportedAt least 0.11.0
WStickerUnsupportedAt least 0.11.0
WStradeUnsupportedAt least 0.11.0
WSorderbookUnsupportedAt least 0.11.0

ticker(market)

Create new Market object arrays.

ParameterTypeDescription
marketstring or Array\<string>'KRW-BTC' or ['KRW-BTC', 'KRW-XRP']

Market class

ParameterTypeDescription
marketstringex) KRW, BTC, USDT ...
coinstringex) BTC, ETH, XRP ...
marketCodestringex) KRW-BTC, KRW-XRP ...
tradeTimeDatetrade time
pricenumberprice
opennumberMarket value
highnumberHighest price
lownumberLowest price
prevClosenumberthe closing price of the previous day
changenumberEVEN: Mixture RISE: Rise FALL: Fall
changePricenumberAbsolute value of change amount
changeRatenumberAbsolute value of change rate
signedChangePricenumbersigned change Price
signedChangeRatenumbersigned change rate
tradeVolumenumberLatest volume
accTradePricenumberaccTradePrice
accTradePrice24numberaccTradePrice24
accTradeVolumenumberCumulative transaction amount(UTC 0)
accTradeVolume24numberCumulative transaction amount for 24 hours
high52wPricenumber52 Weeks New Highest Price
high52wDateDate52 Weeks New Highest Price'Date
low52wPricenumber52 Weeks New Lowest Price
low52wDateDate52 Weeks New Lowest Price's Date
lastUpdateDateThe time when this object updated

autoMarketUpdate(market, time , errorHandler, callback?)

Updates object market every specified time time.

ParameterTypeDescription
marketMarket or Array\<Market>Market object that will be updated.
timenumberFrequency to update (in milliseconds)
errorHandlerfunction, (error) => anyerror handler
callbackfunction, (market) => anyoptional, this function called when object updated.

OrderBook(market)

Create new OrderBook object arrays.

ParameterTypeDescription
marketstring or Array\<string>'KRW-BTC' or ['KRW-BTC', 'KRW-XRP']

OrderBook class

NameTypeDescription
marketstringex) KRW, BTC, USDT ...
coinstringex) BTC, ETH, XRP ...
marketCodestringex) KRW-BTC, KRW-XRP ...
lastUpdateDateThe time when this object updated
askListArray\<Order>Ask order list
bidListArray\<Order>Bid order list
totalAsknumbertotal ask
totalBidnumbertotal bid

Order class

NameTypeDescription
pricenumberprice of order
sizenumbersize of order

autoOrderBookUpDate(orderBook, time , errorHandler, callback?)

Updates object OrderBook every specified time time.

ParameterTypeDescription
orderBookOrderBook or Array\<OrderBook>OrderBook object that will be updated.
timenumberFrequency to update (in milliseconds)
errorHandlerfunction, (error) => anyerror handler
callbackfunction, (orderBook) => anyoptional, this function called when object updated.

ticks(market, count?, to?, cursor?)

Create new Trade object arrays.

ParameterTypeDescription
marketstring or Array\<string>'KRW-BTC' or ['KRW-BTC', 'KRW-XRP']
countnumbercount
tostringHHmmss or HH:mm:ss
cursornumbersequential_id

Trade class

NameTypeDescription
marketstringex) KRW, BTC, USDT ...
coinstringex) BTC, ETH, XRP ...
marketCodestringex) KRW-BTC, KRW-XRP ...
lastUpdateDateThe time when this object updated
tradeTimeDateThe time when traded
pricenumberprice of this trade
volumenumbervolume of this trade
prev_closing_pricenumberprev_closing_price
change_pricenumberprice - prev_closing_price
isAskbooleanTrade type
sequential_idnumberTransaction Number(Unique)

candlesMinutes(market, unit?, count?, to?)

Create Candle object arrays.

ParameterTypeDescription
marketstring or Array\<string>'KRW-BTC' or ['KRW-BTC', 'KRW-XRP']
unitnumber1, 3, 5, 15, 10, 30, 60, 240
countnumbercount
tostringyyyy-MM-dd'T'HH:mm:ssXXX

Candle class

NameTypeDescription
marketstringex) KRW, BTC, USDT ...
coinstringex) BTC, ETH, XRP ...
marketCodestringex) KRW-BTC, KRW-XRP ...
timestampnumberThe time at which the last tick was stored in the candle.
candleDateTimeUTCDateStandard time of the candle (UTC basis)
candleDateTimeKSTDateStandard time of the candle (KST basis)
opennumberMarket value
highnumberHighest price
lownumberLowest price
accTradePricenumberCandle's accTradePrice
accTradeVolumenumberCandle's cumulative transaction amount
lastUpdateDateThe time when this object updated

MinutesCandle class

MinutesCandle extends Candle

NameTypeDescription
unitnumberminutes. Possible values: 1, 3, 5, 15, 10, 30, 60, 240

DayCandle class

DayCandle extends Candle

NameTypeDescription
prevClosingPricenumberthe closing price of the previous day
convertedTradePricenumbera price converted into denominations
changePricenumbervalue of change amount
changeRatenumbervalue of change rate

WeekMonthCandle class

WeekMonthCandle extends Candle

NameTypeDescription
firstDayOfPeriodnumberfirst day of period

allMarket()

List of markets that can be traded at Upbit.

NameTypeDescription
marketstringMarket information provided by Upbit, ex) BTC-XRP
korean_namestringKorean name ex) 비트코인
english_namestringEnglish name ex) Bitcoin

Downloads/wk

12

GitHub Stars

10

LAST COMMIT

1yr ago

MAINTAINERS

1

CONTRIBUTORS

1

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.10.4
latest
1yr ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate