## coinmetro{docsify-ignore}
**Kind**: global class
**Extends**: Exchange
* [fetchCurrencies](#fetchcurrencies)
* [fetchMarkets](#fetchmarkets)
* [fetchOHLCV](#fetchohlcv)
* [fetchTrades](#fetchtrades)
* [fetchMyTrades](#fetchmytrades)
* [fetchOrderBook](#fetchorderbook)
* [fetchTickers](#fetchtickers)
* [fetchBidsAsks](#fetchbidsasks)
* [fetchBalance](#fetchbalance)
* [fetchLedger](#fetchledger)
* [createOrder](#createorder)
* [cancelOrder](#cancelorder)
* [cancelOrder](#cancelorder)
* [fetchOpenOrders](#fetchopenorders)
* [fetchCanceledAndClosedOrders](#fetchcanceledandclosedorders)
* [fetchOrder](#fetchorder)
* [borrowCrossMargin](#borrowcrossmargin)
### fetchCurrencies{docsify-ignore}
fetches all available currencies on an exchange
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: object
- an associative dictionary of currencies
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#d5876d43-a3fe-4479-8c58-24d0f044edfb
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
coinmetro.fetchCurrencies ([params])
```
### fetchMarkets{docsify-ignore}
retrieves data on all markets for coinmetro
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: Array<object>
- an array of objects representing market data
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#9fd18008-338e-4863-b07d-722878a46832
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
coinmetro.fetchMarkets ([params])
```
### fetchOHLCV{docsify-ignore}
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: Array<Array<int>>
- A list of candles ordered as timestamp, open, high, low, close, volume
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#13cfb5bc-7bfb-4847-85e1-e0f35dfb3573
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string
| Yes | the length of time each candle represents |
| since | int
| No | timestamp in ms of the earliest candle to fetch |
| limit | int
| No | the maximum amount of candles to fetch |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch entries for |
```javascript
coinmetro.fetchOHLCV (symbol, timeframe[, since, limit, params])
```
### fetchTrades{docsify-ignore}
get the list of most recent trades for a particular symbol
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: Array<Trade>
- a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#6ee5d698-06da-4570-8c84-914185e05065
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch trades for |
| since | int
| No | timestamp in ms of the earliest trade to fetch |
| limit | int
| No | the maximum amount of trades to fetch (default 200, max 500) |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
coinmetro.fetchTrades (symbol[, since, limit, params])
```
### fetchMyTrades{docsify-ignore}
fetch all trades made by the user
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: Array<Trade>
- a list of [trade structures](https://docs.ccxt.com/#/?id=trade-structure)
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#4d48ae69-8ee2-44d1-a268-71f84e557b7b
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| since | int
| No | the earliest time in ms to fetch trades for |
| limit | int
| No | the maximum number of trades structures to retrieve (default 500, max 1000) |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
coinmetro.fetchMyTrades (symbol[, since, limit, params])
```
### fetchOrderBook{docsify-ignore}
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: object
- A dictionary of [order book structures](https://docs.ccxt.com/#/?id=order-book-structure) indexed by market symbols
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#26ad80d7-8c46-41b5-9208-386f439a8b87
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to fetch the order book for |
| limit | int
| No | the maximum amount of order book entries to return (default 100, max 200) |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
coinmetro.fetchOrderBook (symbol[, limit, params])
```
### fetchTickers{docsify-ignore}
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: object
- a dictionary of [ticker structures](https://docs.ccxt.com/#/?id=ticker-structure)
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#6ecd1cd1-f162-45a3-8b3b-de690332a485
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| No | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
coinmetro.fetchTickers ([symbols, params])
```
### fetchBidsAsks{docsify-ignore}
fetches the bid and ask price and volume for multiple markets
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: object
- a dictionary of [ticker structures](https://docs.ccxt.com/#/?id=ticker-structure)
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#6ecd1cd1-f162-45a3-8b3b-de690332a485
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbols | Array<string>
| No | unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
coinmetro.fetchBidsAsks ([symbols, params])
```
### fetchBalance{docsify-ignore}
query for balance and get the amount of funds available for trading or funds locked in orders
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: object
- a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#741a1dcc-7307-40d0-acca-28d003d1506a
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
coinmetro.fetchBalance ([params])
```
### fetchLedger{docsify-ignore}
fetch the history of changes, actions done by the user or operations that altered balance of the user
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: object
- a [ledger structure](https://docs.ccxt.com/#/?id=ledger-structure)
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#4e7831f7-a0e7-4c3e-9336-1d0e5dcb15cf
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code, default is undefined |
| since | int
| No | timestamp in ms of the earliest ledger entry, default is undefined |
| limit | int
| No | max number of ledger entrys to return (default 200, max 500) |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.until | int
| No | the latest time in ms to fetch entries for |
```javascript
coinmetro.fetchLedger (code[, since, limit, params])
```
### createOrder{docsify-ignore}
create a trade order
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: object
- an [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#a4895a1d-3f50-40ae-8231-6962ef06c771
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified symbol of the market to create an order in |
| type | string
| Yes | 'market' or 'limit' |
| side | string
| Yes | 'buy' or 'sell' |
| amount | float
| Yes | how much of currency you want to trade in units of base currency |
| price | float
| No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.cost | float
| No | the quote quantity that can be used as an alternative for the amount in market orders |
| params.timeInForce | string
| No | "GTC", "IOC", "FOK", "GTD" |
| params.expirationTime | number
| No | timestamp in millisecond, for GTD orders only |
| params.triggerPrice | float
| No | the price at which a trigger order is triggered at |
| params.stopLossPrice | float
| No | *margin only* The price at which a stop loss order is triggered at |
| params.takeProfitPrice | float
| No | *margin only* The price at which a take profit order is triggered at |
| params.margin | bool
| No | true for creating a margin order |
| params.fillStyle | string
| No | fill style of the limit order: "sell" fulfills selling quantity "buy" fulfills buying quantity "base" fulfills base currency quantity "quote" fulfills quote currency quantity |
| params.clientOrderId | string
| No | client's comment |
```javascript
coinmetro.createOrder (symbol, type, side, amount[, price, params])
```
### cancelOrder{docsify-ignore}
cancels an open order
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: object
- An [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**
- https://documenter.getpostman.com/view/3653795/SVfWN6KS#eaea86da-16ca-4c56-9f00-5b1cb2ad89f8
- https://documenter.getpostman.com/view/3653795/SVfWN6KS#47f913fb-8cab-49f4-bc78-d980e6ced316
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | string
| Yes | order id |
| symbol | string
| Yes | not used by coinmetro cancelOrder () |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.margin | string
| No | true for cancelling a margin order |
```javascript
coinmetro.cancelOrder (id, symbol[, params])
```
### cancelOrder{docsify-ignore}
closes an open position
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: object
- An [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#47f913fb-8cab-49f4-bc78-d980e6ced316
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | not used by coinmetro closePosition () |
| side | string
| No | not used by coinmetro closePosition () |
| params | object
| No | extra parameters specific to the exchange API endpoint |
| params.orderID | string
| No | order id |
| params.fraction | number
| No | fraction of order to close, between 0 and 1 (defaults to 1) |
```javascript
coinmetro.cancelOrder (symbol[, side, params])
```
### fetchOpenOrders{docsify-ignore}
fetch all unfilled currently open orders
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: Array<Order>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#518afd7a-4338-439c-a651-d4fdaa964138
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol |
| since | int
| No | the earliest time in ms to fetch open orders for |
| limit | int
| No | the maximum number of open order structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
coinmetro.fetchOpenOrders (symbol[, since, limit, params])
```
### fetchCanceledAndClosedOrders{docsify-ignore}
fetches information on multiple canceled and closed orders made by the user
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: Array<Order>
- a list of [order structures](https://docs.ccxt.com/#/?id=order-structure)
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#4d48ae69-8ee2-44d1-a268-71f84e557b7b
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| symbol | string
| Yes | unified market symbol of the market orders were made in |
| since | int
| No | the earliest time in ms to fetch orders for |
| limit | int
| No | the maximum number of order structures to retrieve |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
coinmetro.fetchCanceledAndClosedOrders (symbol[, since, limit, params])
```
### fetchOrder{docsify-ignore}
fetches information on an order made by the user
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: object
- An [order structure](https://docs.ccxt.com/#/?id=order-structure)
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#95bbed87-db1c-47a7-a03e-aa247e91d5a6
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| id | int
, string
| Yes | order id |
| symbol | string
| Yes | not used by coinmetro fetchOrder () |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
coinmetro.fetchOrder (id, symbol[, params])
```
### borrowCrossMargin{docsify-ignore}
create a loan to borrow margin
**Kind**: instance method of [coinmetro
](#coinmetro)
**Returns**: object
- a [margin loan structure](https://docs.ccxt.com/#/?id=margin-loan-structure)
**See**: https://documenter.getpostman.com/view/3653795/SVfWN6KS#5b90b3b9-e5db-4d07-ac9d-d680a06fd110
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| code | string
| Yes | unified currency code of the currency to borrow |
| amount | float
| Yes | the amount to borrow |
| params | object
| No | extra parameters specific to the exchange API endpoint |
```javascript
coinmetro.borrowCrossMargin (code, amount[, params])
```