Make Your First Upbit API Call

Following this quick REST API test guide, you can make your first Upbit API call easily and get a successful response.

Get Started

This guide walks you through your first Upbit API call, helping you quickly test the Upbit Quotation REST API and confirm a successful response—even if you have no prior programming experience. You can follow along on your own PC without writing complecated code, and the guide introduces both basic and advanced API request examples step by step.

Check the proper endpoint based on your region.
The examples in this page is written using Singapore fiat code(SGD). Set the quote currency to match your region. The base_url differs by country/region. Make sure to specify the correct region value for your environment.

- Singapore (sg): https://sg-api.upbit.com
- Indonesia (id): https://id-api.upbit.com
- Thailand (th): https://th-api.upbit.com

What is cURL?

cURL is a lightweight command-line tool for sending HTTP requests and viewing responses. It’s available by default on most operating systems, so you can run commands directly from your terminal without additional installation.

Looking for code-based integration examples?
If you want to skip the quick tests and jump straight into development, you can find ready-to-use code samples in multiple languages on each API Reference page or in the Recipes menu. Before you start, make sure to check the REST API Usage Guide and WebSocket Usage Guide for important information on API authentication and usage policies.

Testing REST API Calls Using cURL


1. Check Your cURL Environment

Depending on your operating system (OS), please check your cURL environment using the guide below.

cURL comes pre-installed on macOS, so you can use it right away. Open your Terminal and enter the following command:

curl --version
If you see version information output, cURL is installed and ready to use. The actual version may vary depending on your system.

% curl --version
curl 8.7.1 (x86_64-apple-darwin24.0) libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.62.0
Release-Date: 2024-03-27
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe UnixSockets
Most Windows 10 and later systems include cURL by default, but in some cases, you may need to install it manually. Open Command Prompt (cmd) or PowerShell and enter:

curl --version
If version information is displayed, cURL is installed. If not, follow the installation steps below:

  1. Go to the cURL official download page for Windows: (https://curl.se/windows)
  2. In the “curl for Windows” section, choose the appropriate version for your OS (typically “64 bit, Win64 - Generic”).
  3. Download the .zip file and extract it, for example, to C:Program Filescurl.
  4. Add the extracted folder path to your system’s PATH environment variable. (Search for “Environment Variables” in Windows > Edit system environment variables > In “Path”, add your extracted bin directory.)
    C:Program Filescurlin
  5. Save and close, then restart your Command Prompt or PowerShell and run curl --version again to verify installation.

2. First REST API Call: Query Supported Trading Pairs

Once your cURL environment is ready, you can make your first Upbit API call. Let’s query all supported trading pairs. See the List Trading Pairs API Reference for details. Enter the following command in your terminal or cmd/PowerShell:

curl -i --request GET \
     --url https://{region}-api.upbit.com/v1/market/all \
     --header 'Accept: application/json'

Explanation of cURL Arguments:

  • -i (–include): Shows the HTTP status code and headers along with the response. (Optional, for demonstration.)
  • --request GET: Sends an HTTP GET request. (Other APIs may use POST, DELETE, etc.)
  • --url: The endpoint URL, including domain and path.
  • --header: Sets the HTTP request header. The Accept: application/json header requests the response in JSON format.

Sample 200 OK response (truncated):

HTTP/2 200 
date: Thu, 31 Jul 2025 17:40:49 GMT
content-type: application/json;charset=UTF-8
remaining-req: group=market; min=600; sec=9
limit-by-ip: Yes
pragma: no-cache
expires: 0
cache-control: no-cache, no-store, max-age=0, must-revalidate
etag: W/"00d5dc1602bda2c490afe2cfa2f573b73"
...
[{"market":"{fiat}-ETH","english_name":"Ethereum","market_warning": "NONE"},{"market": "{fiat}-XRP","english_name": "XRP","market_warning": "NONE"}, ...

The main fields in the response are described below.

  • HTTP/2 200: Indicates a successful 200 OK response.
  • content-type: application/json;charset=UTF-8: The server returned a JSON response as requested.
  • remaining-req: group=market; min=600; sec=9: Upbit applies request rate limits per IP or API Key. This shows how many calls remain for the market group within the current second.
  • limit-by-ip: Yes: This request is limited by IP.
  • Response JSON data: JSON Array format of response such as [{"market":"{fiat}-ETH", "english_name":"Ethereum"}...] is returned. For all pairs supported by Upbit, market (Pair code) and english_name (English name) fields are returned as a list of JSON objects.

3. Request With Parameters: Query Ticker (Latest Price)

Now that you have the list of supported pairs, let’s query the latest price for a specific pair. For more details, see Tickers API Reference.

Example for SGD-BTC:

curl -i --request GET \
     --url 'https://{region}-api.upbit.com/v1/ticker?markets=SGD-BTC' \
     --header 'accept: application/json'

To specify the pair you want to query, such as SGD-BTC, add the query parameter ?markets=SGD-BTC to the API path /v1/ticker. If you want to retrieve the current prices for multiple pairs at the same time, you can specify additional pairs separated by commas (,), as shown below. Make sure no unnecessary spaces are included.

curl -i --request GET \
     --url 'https://{region}-api.upbit.com/v1/ticker?markets=SGD-BTC,SGD-ETH' \
     --header 'accept: application/json'

Sample response:

HTTP/2 200 
date: Thu, 31 Jul 2025 17:44:37 GMT
content-type: application/json;charset=UTF-8
cf-ray: 967ee7a10febea03-ICN
remaining-req: group=ticker; min=600; sec=9
limit-by-ip: Yes
pragma: no-cache
expires: 0
etag: W/"0cb9272d2763935ad7e745ec47673f8c7"
...

[{"market":"SGD-BTC","trade_date":"20250731","trade_time":"161337","trade_timestamp":1753978417813,"opening_price":153099.0000000,"high_price":153582.0000000,"low_price":153099.0000000,"trade_price":153559.0000000,"prev_closing_price":152114.0000000,"change":"RISE","change_price":1445.0000000,"change_rate":0.0094994544,"signed_change_price":1445.0000000,"signed_change_rate":0.0094994544,"trade_volume":0.00009313,"acc_trade_price":4598.932773760000000,"acc_trade_price_24h":7949.05849291,"acc_trade_volume":0.02997014,"acc_trade_volume_24h":0.05198975,"highest_52_week_price":157745.0000000,"highest_52_week_date":"2025-07-14","lowest_52_week_price":65687.00000000,"lowest_52_week_date":"2024-08-05","timestamp":1753983875027},{"market":"SGD-ETH","trade_date":"20250731","trade_time":"164134","trade_timestamp":1753980094094,"opening_price":4888.0000000,"high_price":4944.0000000,"low_price":4888.0000000,"trade_price":4934.0000000,"prev_closing_price":4895.0000000,"change":"RISE","change_price":39.0000000,"change_rate":0.0079673136,"signed_change_price":39.0000000,"signed_change_rate":0.0079673136,"trade_volume":0.00271508,"acc_trade_price":3665.684223610000000,"acc_trade_price_24h":6034.98647371,"acc_trade_volume":0.74519173,"acc_trade_volume_24h":1.22922436,"highest_52_week_price":5483.00000000,"highest_52_week_date":"2024-12-16","lowest_52_week_price":1881.0000000,"lowest_52_week_date":"2025-04-07","timestamp":1753983875025}]

4. With Complex Parameters: Query Candles

For APIs that require more complex parameters, such as Minutes Candles:

curl -i --request GET \
     --url 'https://{region}-api.upbit.com/v1/candles/days?market={fiat}-BTC&to=2025-07-30T00%3A00%3A00%2B08%3A00&count=2' \
     --header 'accept: application/json'
  • The example request above includes a total of three parameters — market, to, count — each connected with an ampersand (&). The to parameter specifies the end time for the candle query period, which in the example is set to 2025-07-30T00:00:00+08:00.
  • Since all query parameters must be URL-encoded, the request should use to=2025-07-30T00%3A00%3A00%2B08%3A00 as shown in the example. This request retrieves two daily candles prior to SGD-BTC for the SGD-BTC pair, and the response is as follows.

Sample response:

HTTP/2 200 
date: Thu, 31 Jul 2025 17:46:46 GMT
content-type: application/json;charset=UTF-8
remaining-req: group=candles; min=600; sec=9
limit-by-ip: Yes
pragma: no-cache
expires: 0
etag: W/"09fa882e3f289ffb6b4d427c485bae42c"
...

[{"market":"SGD-BTC","candle_date_time_utc":"2025-07-29T00:00:00","opening_price":152080.00000000,"high_price":152081.00000000,"low_price":151500.00000000,"trade_price":151721.00000000,"timestamp":1753831042977,"candle_acc_trade_price":6343.86351099,"candle_acc_trade_volume":0.04181876,"prev_closing_price":152104.00000000,"change_price":-383.00000000,"change_rate":-0.0025180140},{"market":"SGD-BTC","candle_date_time_utc":"2025-07-28T00:00:00","opening_price":152702.00000000,"high_price":153526.00000000,"low_price":152081.00000000,"trade_price":152104.00000000,"timestamp":1753733484292,"candle_acc_trade_price":29083.21156018,"candle_acc_trade_volume":0.19101445,"prev_closing_price":152891.00000000,"change_price":-787.00000000,"change_rate":-0.0051474580}]

As a normal response to the request, you can see that the candle data for July 28 and July 29 has been retrieved.

What is URL Encoding?
URL encoding is an encoding method that converts characters that cannot be included in a URL within a communication protocol into transmittable characters. Target characters, including special characters, are converted during encoding into a string consisting of a percent sign (%) followed by two hexadecimal digits.

(Example) : is encoded as %3A and + is encoded as %2B.


5. Try More cURL API Tests

With cURL, you can easily test various Upbit market data APIs such as ticker, candles, trades, and order book. Refer to each API Reference page, enter your query parameters, and use the example cURL command provided to test more endpoints.


Wrapping Up

This guide showed how to call Upbit’s Quotation APIs and verify successful responses. For next steps, check the “What’s Next” section and navigate to the guides you need:

  • If you want to move on to account integration—such as checking balances, managing orders, or handling deposits/withdrawals—proceed to API Key Issuance to get your own Upbit API Key.
  • For more Quotation API endpoints and examples, check out the Quotation API Reference for detailed specifications and sample requests.