# Tokocrypto API

> Returns Tokocrypto trading symbols, tickers, candlesticks, order book depth and recent or aggregated trades.

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

Every main-market trading symbol with its assets, whether spot trading is on and the price and quantity steps, 100 symbols a page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Filter by symbol or base asset, such as btc. |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `base` (string), `quote` (string), `stepSize` (string), `symbol` (string), `tickSize` (string), `trading` (boolean)

```bash
curl "https://api.hoshime.com/v1/tokocrypto/symbols" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/tokocrypto/ticker

Last price, 24-hour high, low, change and volume of one symbol.

Scope: `social:read` · Units: 1

| Parameter | Type | Required | Description |
|---|---|---|---|
| `symbol` | string | yes | Trading symbol, such as BTCUSDT or BTC_USDT. (e.g. BTCUSDT) |
| `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), `high` (string), `low` (string), `open` (string), `openedAt` (string), `price` (string), `quoteVolume` (string), `symbol` (string), `trades` (integer (int64)), `updatedAt` (string), `volume` (string)

```bash
curl "https://api.hoshime.com/v1/tokocrypto/ticker?symbol=BTCUSDT" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/tokocrypto/klines

Candlesticks (open, high, low, close, volume) of one symbol, oldest first.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `symbol` | string | yes | Trading symbol, such as BTCUSDT or BTC_USDT. (e.g. BTCUSDT) |
| `interval` | string | yes | Candle length. (one of 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M; e.g. 1h) |
| `limit` | integer | no | Number of candles to return, the latest ones. (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), `closedAt` (string), `high` (string), `low` (string), `open` (string), `openedAt` (string), `quoteVolume` (string), `trades` (integer (int64)), `volume` (string)

```bash
curl "https://api.hoshime.com/v1/tokocrypto/klines?symbol=BTCUSDT&interval=1h" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/tokocrypto/depth

The order book of one symbol: best bids and asks.

Scope: `social:read` · Units: 1

| Parameter | Type | Required | Description |
|---|---|---|---|
| `symbol` | string | yes | Trading symbol, such as BTCUSDT or BTC_USDT. (e.g. BTCUSDT) |
| `levels` | integer | no | Price levels to return on each side. (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: `asks` (Level[]), `asks[].amount` (string), `asks[].price` (string), `bids` (Level[]), `bids[].amount` (string), `bids[].price` (string), `symbol` (string), `updateId` (string)

```bash
curl "https://api.hoshime.com/v1/tokocrypto/depth?symbol=BTCUSDT" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/tokocrypto/aggTrades

Compressed trades of one symbol, oldest first: trades at one price and taker side are merged.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `symbol` | string | yes | Trading symbol, such as BTCUSDT or BTC_USDT. (e.g. BTCUSDT) |
| `limit` | integer | no | Trades to return, at most 1000. (default 500) |
| `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: `firstTradeId` (string), `id` (string), `isBuyerMaker` (boolean), `lastTradeId` (string), `price` (string), `quantity` (string), `tradedAt` (string)

```bash
curl "https://api.hoshime.com/v1/tokocrypto/aggTrades?symbol=BTCUSDT" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/tokocrypto/trades

Latest individual trades of one symbol, newest last.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `symbol` | string | yes | Trading symbol, such as BTCUSDT or BTC_USDT. (e.g. BTCUSDT) |
| `limit` | integer | no | Trades to return, at most 1000. (default 500) |
| `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), `isBuyerMaker` (boolean), `price` (string), `quantity` (string), `quoteQuantity` (string), `tradedAt` (string)

```bash
curl "https://api.hoshime.com/v1/tokocrypto/trades?symbol=BTCUSDT" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
