Getting Quotes via REST API

1. Market Information and Ticker

Returns all listing market list that is provided by UPbit.

curl --request GET \
  --url https://sg-api.upbit.com/v1/market/all
curl --request GET \
  --url https://id-api.upbit.com/v1/market/all
curl --request GET \
  --url https://th-api.upbit.com/v1/market/all

The value of the returned "market" field is used for request parameters from other APIs.
For example, if you want to see the Bitcoin market price in the SGD market, then you can input SGD-BTC in the market parameter.
If you want the current price of Bitcoins that are listed in the SGD market, you can use the Ticker API.

curl --request GET \
  --url 'https://sg-api.upbit.com/v1/ticker?markets=SGD-BTC'
curl --request GET \
  --url 'https://id-api.upbit.com/v1/ticker?markets=IDR-BTC'
curl --request GET \
  --url 'https://th-api.upbit.com/v1/ticker?markets=THB-BTC'

Unlike other APIs, the Ticker API can request multiple Tickers separated by commas (,) in the request parameter with the 'markets' field name.This API is useful for bringing the status (snapshot) of a certain market in the digital asset market.

2. Candles

A "candle" is also referred as a bar and the basic bar for configuring a chart.
Of the candles that can be obtained through the UPbit market price API, each of the "minute candles (minute bar)" refers to comprehensive information on the market price in intervals of 1, 3, 5, 10, 30, and 60 minutes.

curl --request GET \
  --url 'https://sg-api.upbit.com/v1/candles/minutes/5?market=SGD-BTC&count=3'
curl --request GET \
  --url 'https://id-api.upbit.com/v1/candles/minutes/5?market=IDR-BTC&count=3'
curl --request GET \
  --url 'https://th-api.upbit.com/v1/candles/minutes/5?market=THB-BTC&count=3'

The result of this request will bring three 5-minute bars based on the most recent time. Based on the characteristics of the minute bar, the basic time is 0, 5, 10, 15... to 55 minutes.
One thing to note is that you can request up to 200 candles at once. If you would like to request a larger number of candles, we recommend making sequential requests by using the pagination technique.
We also offer daily, monthly, and weekly candle in this way.

Use "to" request parameter

The "to" parameter that is used in the candle API follows the ISO8061 standard. Therefore, you can make a request as follows.

  1. Request one 1-minute bar from 12:00 AM based on UTC
    (Singapore) https://sg-api.upbit.com/v1/candles/minutes/1?market=SGD-BTC&to=2019-10-31T00:00:00Z
    (Indonesia) https://id-api.upbit.com/v1/candles/minutes/1?market=IDR-BTC&to=2019-10-31T00:00:00Z

2-1. Request one 1-minute bar from 07:00 AM based on SGT(+08:00)
(Singapore) https://sg-api.upbit.com/v1/candles/minutes/1?market=SGD-BTC&to=2019-10-31T07:00:00+08:00

2-2. Request one 1-minute bar from 07:00 AM based on Jakarta time(+07:00)
(Indonesia) https://id-api.upbit.com/v1/candles/minutes/1?market=IDR-BTC&to=2019-10-31T07:00:00+07:00

When using the "to" parameter, please check that the URL encode is correct. If you try to make the above request right away through the browser, you can make the request as follows.
(Singapore) https://sg-api.upbit.com/v1/candles/minutes/1?market=SGD-BTC&to=2019-10-31T07:00:00%2B08:00
(Indonesia) https://id-api.upbit.com/v1/candles/minutes/1?market=IDR-BTC&to=2019-10-31T07:00:00%2B07:00

3. Quotation Trades

"Trades" means that the transaction was established and you can obtain the trades details for today or recent days through the market price API.

Basically, when the API is called, it returns the most recent trade data of a specific digital asset.
For example, if the latest trade was two days ago, we return the trade data two days ago.

In addition, you can use the query string to check past data within 7 days of the most recent date of trade.

You can request up to 200 trades at once. If you would like to request a larger number, we recommend making sequential requests by using the pagination technique.