Socket
Socket
Sign inDemoInstall

upbit-api

Package Overview
Dependencies
47
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    upbit-api

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


Version published
Weekly downloads
29
increased by2800%
Maintainers
1
Install size
3.76 MB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 14 May 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc