Back to Ccxt

Coinmetro

wiki/exchanges/coinmetro.md

4.5.5216.4 KB
Original Source

<a name="coinmetro" id="coinmetro"></a>

coinmetro{docsify-ignore}

Kind: global class
Extends: <code>Exchange</code>

<a name="fetchCurrencies" id="fetchcurrencies"></a>

fetchCurrencies{docsify-ignore}

fetches all available currencies on an exchange

Kind: instance method of <code>coinmetro</code>
Returns: <code>object</code> - an associative dictionary of currencies

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#d5876d43-a3fe-4479-8c58-24d0f044edfb

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinmetro.fetchCurrencies ([params])

<a name="fetchMarkets" id="fetchmarkets"></a>

fetchMarkets{docsify-ignore}

retrieves data on all markets for coinmetro

Kind: instance method of <code>coinmetro</code>
Returns: <code>Array<object></code> - an array of objects representing market data

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#9fd18008-338e-4863-b07d-722878a46832

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinmetro.fetchMarkets ([params])

<a name="fetchOHLCV" id="fetchohlcv"></a>

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 <code>coinmetro</code>
Returns: <code>Array<Array<int>></code> - 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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch entries for
javascript
coinmetro.fetchOHLCV (symbol, timeframe[, since, limit, params])

<a name="fetchTrades" id="fetchtrades"></a>

fetchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of <code>coinmetro</code>
Returns: <code>Array<Trade></code> - a list of trade structures

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#6ee5d698-06da-4570-8c84-914185e05065

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch (default 200, max 500)
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinmetro.fetchTrades (symbol[, since, limit, params])

<a name="fetchMyTrades" id="fetchmytrades"></a>

fetchMyTrades{docsify-ignore}

fetch all trades made by the user

Kind: instance method of <code>coinmetro</code>
Returns: <code>Array<Trade></code> - a list of trade structures

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#4d48ae69-8ee2-44d1-a268-71f84e557b7b

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades structures to retrieve (default 500, max 1000)
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinmetro.fetchMyTrades (symbol[, since, limit, params])

<a name="fetchOrderBook" id="fetchorderbook"></a>

fetchOrderBook{docsify-ignore}

fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>coinmetro</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#26ad80d7-8c46-41b5-9208-386f439a8b87

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return (default 100, max 200)
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinmetro.fetchOrderBook (symbol[, limit, params])

<a name="fetchTickers" id="fetchtickers"></a>

fetchTickers{docsify-ignore}

fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

Kind: instance method of <code>coinmetro</code>
Returns: <code>object</code> - a dictionary of ticker structures

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#6ecd1cd1-f162-45a3-8b3b-de690332a485

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinmetro.fetchTickers ([symbols, params])

<a name="fetchBidsAsks" id="fetchbidsasks"></a>

fetchBidsAsks{docsify-ignore}

fetches the bid and ask price and volume for multiple markets

Kind: instance method of <code>coinmetro</code>
Returns: <code>object</code> - a dictionary of ticker structures

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#6ecd1cd1-f162-45a3-8b3b-de690332a485

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinmetro.fetchBidsAsks ([symbols, params])

<a name="fetchBalance" id="fetchbalance"></a>

fetchBalance{docsify-ignore}

query for balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of <code>coinmetro</code>
Returns: <code>object</code> - a balance structure

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#741a1dcc-7307-40d0-acca-28d003d1506a

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinmetro.fetchBalance ([params])

<a name="fetchLedger" id="fetchledger"></a>

fetchLedger{docsify-ignore}

fetch the history of changes, actions done by the user or operations that altered the balance of the user

Kind: instance method of <code>coinmetro</code>
Returns: <code>object</code> - a ledger structure

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#4e7831f7-a0e7-4c3e-9336-1d0e5dcb15cf

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code, default is undefined
since<code>int</code>Notimestamp in ms of the earliest ledger entry, default is undefined
limit<code>int</code>Nomax number of ledger entries to return (default 200, max 500)
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch entries for
javascript
coinmetro.fetchLedger ([code, since, limit, params])

<a name="createOrder" id="createorder"></a>

createOrder{docsify-ignore}

create a trade order

Kind: instance method of <code>coinmetro</code>
Returns: <code>object</code> - an order structure

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#a4895a1d-3f50-40ae-8231-6962ef06c771

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much of currency you want to trade in units of base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.cost<code>float</code>Nothe quote quantity that can be used as an alternative for the amount in market orders
params.timeInForce<code>string</code>No"GTC", "IOC", "FOK", "GTD"
params.expirationTime<code>number</code>Notimestamp in millisecond, for GTD orders only
params.triggerPrice<code>float</code>Nothe price at which a trigger order is triggered at
params.stopLossPrice<code>float</code>Nomargin only The price at which a stop loss order is triggered at
params.takeProfitPrice<code>float</code>Nomargin only The price at which a take profit order is triggered at
params.margin<code>bool</code>Notrue for creating a margin order
params.fillStyle<code>string</code>Nofill 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<code>string</code>Noclient's comment
javascript
coinmetro.createOrder (symbol, type, side, amount[, price, params])

<a name="cancelOrder" id="cancelorder"></a>

cancelOrder{docsify-ignore}

cancels an open order

Kind: instance method of <code>coinmetro</code>
Returns: <code>object</code> - An order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesnot used by coinmetro cancelOrder ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.margin<code>string</code>Notrue for cancelling a margin order
javascript
coinmetro.cancelOrder (id, symbol[, params])

<a name="closePosition" id="closeposition"></a>

closePosition{docsify-ignore}

closes an open position

Kind: instance method of <code>coinmetro</code>
Returns: <code>object</code> - An order structure

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#47f913fb-8cab-49f4-bc78-d980e6ced316

ParamTypeRequiredDescription
symbol<code>string</code>Yesnot used by coinmetro closePosition ()
side<code>string</code>Nonot used by coinmetro closePosition ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.orderID<code>string</code>Noorder id
params.fraction<code>number</code>Nofraction of order to close, between 0 and 1 (defaults to 1)
javascript
coinmetro.closePosition (symbol[, side, params])

<a name="fetchOpenOrders" id="fetchopenorders"></a>

fetchOpenOrders{docsify-ignore}

fetch all unfilled currently open orders

Kind: instance method of <code>coinmetro</code>
Returns: <code>Array<Order></code> - a list of order structures

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#518afd7a-4338-439c-a651-d4fdaa964138

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch open orders for
limit<code>int</code>Nothe maximum number of open order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinmetro.fetchOpenOrders (symbol[, since, limit, params])

<a name="fetchCanceledAndClosedOrders" id="fetchcanceledandclosedorders"></a>

fetchCanceledAndClosedOrders{docsify-ignore}

fetches information on multiple canceled and closed orders made by the user

Kind: instance method of <code>coinmetro</code>
Returns: <code>Array<Order></code> - a list of order structures

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#4d48ae69-8ee2-44d1-a268-71f84e557b7b

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinmetro.fetchCanceledAndClosedOrders (symbol[, since, limit, params])

<a name="fetchOrder" id="fetchorder"></a>

fetchOrder{docsify-ignore}

fetches information on an order made by the user

Kind: instance method of <code>coinmetro</code>
Returns: <code>object</code> - An order structure

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#95bbed87-db1c-47a7-a03e-aa247e91d5a6

ParamTypeRequiredDescription
id<code>int</code>, <code>string</code>Yesorder id
symbol<code>string</code>Yesnot used by coinmetro fetchOrder ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinmetro.fetchOrder (id, symbol[, params])

<a name="borrowCrossMargin" id="borrowcrossmargin"></a>

borrowCrossMargin{docsify-ignore}

create a loan to borrow margin

Kind: instance method of <code>coinmetro</code>
Returns: <code>object</code> - a margin loan structure

See: https://documenter.getpostman.com/view/3653795/SVfWN6KS#5b90b3b9-e5db-4d07-ac9d-d680a06fd110

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency to borrow
amount<code>float</code>Yesthe amount to borrow
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinmetro.borrowCrossMargin (code, amount[, params])