MCPcopy Create free account
hub / github.com/ccxt/ccxt / fetchOrder

Method fetchOrder

js/src/exmo.js:1745–1775  ·  view source on GitHub ↗

* @method * @name exmo#fetchOrder * @description *spot only* fetches information on an order made by the user * @see https://documenter.getpostman.com/view/10287440/SzYXWKPi#cf27781e-28e5-4b39-a52d-3110f5d22459 // spot * @param {string} id order id * @param {string} symbol

(id, symbol = undefined, params = {})

Source from the content-addressed store, hash-verified

1743 * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
1744 */
1745 async fetchOrder(id, symbol = undefined, params = {}) {
1746 await this.loadMarkets();
1747 const request = {
1748 'order_id': id.toString(),
1749 };
1750 const response = await this.privatePostOrderTrades(this.extend(request, params));
1751 //
1752 // {
1753 // "type": "buy",
1754 // "in_currency": "BTC",
1755 // "in_amount": "1",
1756 // "out_currency": "USD",
1757 // "out_amount": "100",
1758 // "trades": [
1759 // {
1760 // "trade_id": 3,
1761 // "date": 1435488248,
1762 // "type": "buy",
1763 // "pair": "BTC_USD",
1764 // "order_id": 12345,
1765 // "quantity": 1,
1766 // "price": 100,
1767 // "amount": 100
1768 // }
1769 // ]
1770 // }
1771 //
1772 const order = this.parseOrder(response);
1773 order['id'] = id.toString();
1774 return order;
1775 }
1776 /**
1777 * @method
1778 * @name exmo#fetchOrderTrades

Callers

nothing calls this directly

Calls 5

parseOrderMethod · 0.95
loadMarketsMethod · 0.45
toStringMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected