# Quotation [← REST API Guide](../rest_api.md) ## Get Tickers {#get-_v2_tickers} ``` GET /v2/tickers ``` Get latest price and trading volume for a symbol or symbols. ### Schema ```ts // URL query parameter type RequestQuery = { /** Enter the symbols of the trading pairs you want to query, separated by commas (,). If omitted, information for all available trading pairs on Digital X will be returned. Example: "btc_krw,eth_krw" */ symbol?: string; }; // JSON response (the `data` field of the `{ success: true, data }` envelope) type Response = Array<{ /** Trading pair symbol. Example: "btc_krw" */ symbol: string; /** Open price (24H). Example: "361922.23" */ open: string; /** High price (24H). Example: "361922.23" */ high: string; /** Low price (24H). Example: "361922.23" */ low: string; /** Last price (24H). Example: "361922.23" */ close: string; /** Previous close price (24H). Example: "261922.23" */ prevClose: string; /** changed price. `close - prevClose`. Example: "100000" */ priceChange: string; /** changed price percent. `100 * (close - prevClose) / prevClose`. Example: "38.18" */ priceChangePercent: string; /** Trading volume (24H), in the base currency (`symbol`'s first segment). Example: "100" */ volume: string; /** Trading volume (24H), in the quote currency (`symbol`'s second segment). Example: "1000000000" */ quoteVolume: string; /** Best bid price. Example: "5000" */ bestBidPrice: string; /** Best ask price. Example: "6000" */ bestAskPrice: string; /** Last traded timestamp (ms). Example: 1700000000000 */ lastTradedAt: number; }>; ``` ### Example #### Request ```sh curl 'https://api.digitalx.miraeasset.com/v2/tickers?symbol=btc_krw,eth_krw' ``` #### Response ```json { "success": true, "data": [ { "symbol": "btc_krw", "open": "77060000", "high": "79650000", "low": "76550000", "close": "77136000", "prevClose": "77060000", "priceChange": "76000", "priceChangePercent": "0.1", "volume": "48.73739983", "quoteVolume": "3785149733.32633", "bestBidPrice": "77136000", "bestAskPrice": "77193000", "lastTradedAt": 1725525721041 }, { "symbol": "eth_krw", "open": "3259000", "high": "3370000", "low": "3222000", "close": "3250000", "prevClose": "3259000", "priceChange": "-9000", "priceChangePercent": "-0.28", "volume": "161.99278306", "quoteVolume": "532827941.01581", "bestBidPrice": "3251000", "bestAskPrice": "3254000", "lastTradedAt": 1725525545630 } ] } ``` ## Get Orderbook {#get-_v2_orderbook} ``` GET /v2/orderbook ``` Get orderbook data. ### Schema ```ts // URL query parameter type RequestQuery = { /** Trading pair. Example: "btc_krw" */ symbol: string; /** Orderbook grouping level. Available levels can be checked via the Get Tick Size Policy API. If not provided, grouping will not be applied. Example: "1000" */ level?: string; }; // JSON response (the `data` field of the `{ success: true, data }` envelope) type Response = { /** timestamp (ms). Example: 1700000000000 */ timestamp: number; /** bids */ bids: Array<{ /** price. Example: "250000" */ price: string; /** quantity. Example: "10" */ qty: string; /** Total amount in the quote currency (only set when orderbook grouping is used. When not using grouping, it can be calculated as `price * qty`). Example: "2500000" */ amt?: string | null; }>; /** asks */ asks: Array<{ /** price. Example: "250000" */ price: string; /** quantity. Example: "10" */ qty: string; /** Total amount in the quote currency (only set when orderbook grouping is used. When not using grouping, it can be calculated as `price * qty`). Example: "2500000" */ amt?: string | null; }>; }; ``` ### Example #### Request ```sh curl 'https://api.digitalx.miraeasset.com/v2/orderbook?symbol=btc_krw' ``` #### Response ```json { "success": true, "data": { "timestamp": 1708057740895, "bids": [ { "price": "73303000", "qty": "0.00898326" }, { "price": "73302000", "qty": "0.00790837" }, { "price": "73301000", "qty": "0.00843099" }, { "price": "73300000", "qty": "0.00054024" }, { "price": "73299000", "qty": "0.00663446" } ], "asks": [ { "price": "73304000", "qty": "0.00985212" }, { "price": "73305000", "qty": "0.00367505" }, { "price": "73306000", "qty": "0.0096254" }, { "price": "73307000", "qty": "0.00502544" }, { "price": "73308000", "qty": "0.00640584" } ] } } ``` ## Get Recent Trades {#get-_v2_trades} ``` GET /v2/trades ``` Get recent trades. ### Schema ```ts // URL query parameter type RequestQuery = { /** Trading pair. Example: "btc_krw" */ symbol: string; /** limit (range: 1 ~ 500). Example: 100 */ limit?: number; }; // JSON response (the `data` field of the `{ success: true, data }` envelope) type Response = Array<{ /** timestamp (ms). Example: 1700000000000 */ timestamp: number; /** price. Example: "250000" */ price: string; /** quantity. Example: "10" */ qty: string; /** whether the taker is the buyer. Example: true */ isBuyerTaker: boolean; /** trade ID (the ID of the trade execution assigned to each trading pair). Monotonically increasing per trading pair, but not guaranteed to be contiguous. Example: 1234 */ tradeId: number; }>; ``` ### Example #### Request ```sh curl 'https://api.digitalx.miraeasset.com/v2/trades?symbol=btc_krw&limit=4' ``` #### Response ```json { "success": true, "data": [ { "timestamp": 1708057271149, "price": "70507000", "qty": "0.00981535", "isBuyerTaker": false, "tradeId": 1004 }, { "timestamp": 1708057271035, "price": "70508000", "qty": "0.00682475", "isBuyerTaker": false, "tradeId": 1003 }, { "timestamp": 1708057270922, "price": "70509000", "qty": "0.00844147", "isBuyerTaker": false, "tradeId": 1002 }, { "timestamp": 1708057270809, "price": "70510000", "qty": "0.00553963", "isBuyerTaker": false, "tradeId": 1001 } ] } ``` ## Get Candlesticks {#get-_v2_candles} ``` GET /v2/candles ``` Get historical candlesticks (klines) data. ### Schema ```ts // URL query parameter type RequestQuery = { /** Trading pair. Example: "btc_krw" */ symbol: string; /** interval */ interval: | "1" // 1 min | "5" // 5 mins | "15" // 15 mins | "30" // 30 mins | "60" // 1 hour | "240" // 4 hours | "1D" // 1 day | "1W" // 1 week ; /** start timestamp. (default: listed time). Example: 1600000000000 */ start?: number; /** end timestamp. must be larger than `start`. (default: now). Example: 1700000000000 */ end?: number; /** limit (range: 1 ~ 200). Example: 100 */ limit: number; }; // JSON response (the `data` field of the `{ success: true, data }` envelope) type Response = Array<{ /** candle start timestamp. Example: 1619244573612 */ timestamp: number; /** open price. Example: "361922.23" */ open: string; /** high price. Example: "361922.23" */ high: string; /** low price. Example: "361922.23" */ low: string; /** close price. Example: "361922.23" */ close: string; /** Trading volume, in the base currency. Example: "100" */ volume: string; }>; ``` ### Example #### Request ```sh curl 'https://api.digitalx.miraeasset.com/v2/candles?symbol=btc_krw&interval=60&limit=5&end=1700000000000' ``` #### Response ```json { "success": true, "data": [ { "timestamp": 1708041600000, "open": "71211000", "high": "9999990000", "low": "300000", "close": "71392000", "volume": "1.932320026577213946" }, { "timestamp": 1708045200000, "open": "73510000", "high": "74605000", "low": "300000", "close": "72315000", "volume": "2.418698679231323743" }, { "timestamp": 1708048800000, "open": "72315000", "high": "9999990000", "low": "300000", "close": "72380000", "volume": "1.947520219976227299" }, { "timestamp": 1708052400000, "open": "70267000", "high": "74777000", "low": "300000", "close": "74049000", "volume": "2.254855048982521506" }, { "timestamp": 1708056000000, "open": "68304000", "high": "74834000", "low": "68241000", "close": "74825000", "volume": "0.630193755379195341" } ] } ``` ## Get Trading Pairs {#get-_v2_currencyPairs} ``` GET /v2/currencyPairs ``` Get supported trading pairs with their currencies and order value bounds. ### Schema ```ts // No request parameters // JSON response (the `data` field of the `{ success: true, data }` envelope) type Response = Array<{ /** trading pair symbol. Example: "btc_krw" */ symbol: string; status: | "launched" // trading available | "stopped" // trading unavailable ; /** Base currency of the pair — the asset being traded (the first segment of `symbol`). Example: "btc" */ baseCurrency: string; /** Quote currency of the pair — the currency the pair is priced in (the second segment of `symbol`). `price`, `amt`, `minOrderValue`, and `maxOrderValue` are denominated in it. Example: "krw" */ quoteCurrency: string; /** Minimum order value for this pair, in `quoteCurrency`. An order whose `qty` * `price` (or `amt` for a market buy) is below it is rejected with `ORDER_VALUE_TOO_SMALL`. Omitted when this pair publishes no minimum: skip the client-side check and let the server decide — an omitted bound is not a guarantee that the order value is unconstrained. Example: "5000" */ minOrderValue?: string | null; /** Maximum order value for this pair, in `quoteCurrency`. An order above it is rejected with `ORDER_VALUE_TOO_LARGE`. Omitted when this pair publishes no maximum: skip the client-side check and let the server decide — an omitted bound is not a guarantee that the order value is unconstrained. Example: "1000000000" */ maxOrderValue?: string | null; }>; ``` ### Example #### Request ```sh curl 'https://api.digitalx.miraeasset.com/v2/currencyPairs' ``` #### Response ```json { "success": true, "data": [ { "symbol": "btc_krw", "status": "launched", "baseCurrency": "btc", "quoteCurrency": "krw", "minOrderValue": "5000", "maxOrderValue": "1000000000" }, { "symbol": "eth_krw", "status": "launched", "baseCurrency": "eth", "quoteCurrency": "krw", "minOrderValue": "5000", "maxOrderValue": "1000000000" }, { "symbol": "xrp_krw", "status": "stopped", "baseCurrency": "xrp", "quoteCurrency": "krw", "minOrderValue": "5000", "maxOrderValue": "1000000000" } ] } ``` ## Get Tick Size Policy {#get-_v2_tickSizePolicy} ``` GET /v2/tickSizePolicy ``` Get tick size policy and orderbook grouping levels for a trading pair. ### Schema ```ts // URL query parameter type RequestQuery = { /** Trading pair symbol. Example: "xrp_krw" */ symbol: string; }; // JSON response (the `data` field of the `{ success: true, data }` envelope) type Response = Array<{ /** Trading pair symbol. Example: "xrp_krw" */ symbol: string; /** * Tick size policy list * From the array, find the item with the largest `priceGte` value where `order price >= priceGte`, and use its `tickSize`. * Example: For an order price of 150, use the `tickSize` from the item with `priceGte` of "100". */ tickSizePolicy: Array<{ /** Minimum price for this range (inclusive). Example: "0.1" */ priceGte: string; /** Tick size for this price range. Example: "0.0001" */ tickSize: string; }>; /** Available orderbook grouping levels */ orderbookLevels: string[]; }>; ``` ### Example #### Request ```sh curl 'https://api.digitalx.miraeasset.com/v2/tickSizePolicy?symbol=xrp_krw' ``` #### Response ```json { "success": true, "data": [ { "symbol": "xrp_krw", "tickSizePolicy": [ { "priceGte": "0", "tickSize": "0.0001" }, { "priceGte": "1", "tickSize": "0.001" }, { "priceGte": "10", "tickSize": "0.01" }, { "priceGte": "100", "tickSize": "0.1" }, { "priceGte": "1000", "tickSize": "1" }, { "priceGte": "5000", "tickSize": "5" }, { "priceGte": "10000", "tickSize": "10" }, { "priceGte": "50000", "tickSize": "50" }, { "priceGte": "100000", "tickSize": "100" }, { "priceGte": "500000", "tickSize": "500" }, { "priceGte": "1000000", "tickSize": "1000" } ], "orderbookLevels": [ "0.1", "1", "10", "100" ] } ] } ```