# Upbit API

> Korean exchange prices in KRW, BTC and USDT: day ticker, candles and recent trades.

Category: Finance & Crypto. Region: South Korea. 3 endpoints at `https://api.hoshime.com/v1/upbit/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/upbit
## GET /v1/upbit/ticker

Last price and today's statistics of one Upbit market, in KRW, BTC or USDT as its quote.

Scope: `social:read` · Units: 1 · Cached: 1 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `market` | string | yes | Market code: quote currency, a dash and the coin, such as KRW-BTC. (e.g. KRW-BTC) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `change` (string), `changePercent` (string), `direction` (string), `high` (string), `low` (string), `open` (string), `prevClose` (string), `price` (string), `quoteVolume` (string), `symbol` (string), `updatedAt` (string), `volume` (string)

```bash
curl "https://api.hoshime.com/v1/upbit/ticker?market=KRW-BTC" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/upbit/trades

The most recent trades of one market, newest first.

Scope: `social:read` · Units: 1 · Cached: 1 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `market` | string | yes | Market code: quote currency, a dash and the coin, such as KRW-BTC. (e.g. KRW-BTC) |
| `limit` | integer | no | Items per page, 1 to 200. (default 50) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `id` (string), `price` (string), `side` (string), `size` (string), `tradedAt` (string)

```bash
curl "https://api.hoshime.com/v1/upbit/trades?market=KRW-BTC" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/upbit/candles

Candles of one Upbit market, oldest first.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `market` | string | yes | Market code: quote currency, a dash and the coin, such as KRW-BTC. (e.g. KRW-BTC) |
| `unit` | string | no | Candle length in minutes (1 to 240), or day, week or month. (one of 1, 3, 5, 10, 15, 30, 60, 240, day, week, month; default 60) |
| `limit` | integer | no | Items per page, 1 to 200. (default 100) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `close` (string), `high` (string), `low` (string), `open` (string), `openedAt` (string), `quoteVolume` (string), `volume` (string)

```bash
curl "https://api.hoshime.com/v1/upbit/candles?market=KRW-BTC" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
