CCXT
mudrex

mudrex

mudrex cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.

🔌 Looking for raw exchange endpoints? See the mudrex implicit API — every endpoint in this exchange's API exposed as an implicit method.

mudrex

Kind: global class
Extends: Exchange

fetchOHLCV

fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of mudrex
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://docs.trade.mudrex.com/docs/historical-kline

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest candle to fetch
params.pricestringNo"mark" to fetch mark price candles
mudrex.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchMarkOHLCV

fetches historical mark price candlestick data containing the open, high, low, and close price of a market

Kind: instance method of mudrex
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.fetchMarkOHLCV (symbol, timeframe, since?, limit?, params?)

fetchTicker

fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of mudrex
Returns: object - a ticker structure

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.fetchTicker (symbol, params?)

fetchTickers

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

Kind: instance method of mudrex
Returns: object - a dictionary of ticker structures

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolsArray<string>Nounified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.fetchTickers (symbols?, params?)

fetchMarkets

retrieves data on all markets for the exchange

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

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.fetchMarkets (params?)

fetchBalance

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

Kind: instance method of mudrex
Returns: object - a balance structure

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'swap' (default) or 'spot' - which wallet balance to fetch
params.trade_currencystringNothe settlement currency to query the balance for
mudrex.fetchBalance (params?)

fetchLeverage

fetch the set leverage for a market

Kind: instance method of mudrex
Returns: object - a leverage structure

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.fetchLeverage (symbol, params?)

setLeverage

set the level of leverage for a market

Kind: instance method of mudrex
Returns: object - response from the exchange

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginTypestringNo'ISOLATED' (default) or 'CROSSED'
mudrex.setLeverage (leverage, symbol, params?)

createOrder

create a trade order

Kind: instance method of mudrex
Returns: object - an order structure

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolstringYesunified market symbol
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much you want to trade in units of the base currency
pricefloatNothe price to fulfill the order, in units of the quote currency (also required for market orders on this exchange)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.leverageintNoleverage for the order, required if setLeverage() was not called beforehand
params.reduceOnlyboolNotrue if the order is reduce only
params.takeProfitobjectNotakeProfit object in params containing the trigger price of the take-profit order attached to this order
params.takeProfit.triggerPricefloatNotake profit trigger price
params.stopLossobjectNostopLoss object in params containing the trigger price of the stop-loss order attached to this order
params.stopLoss.triggerPricefloatNostop loss trigger price
params.takeProfitPricefloatNothe trigger price for a standalone take-profit order on an existing position (requires params.positionId)
params.stopLossPricefloatNothe trigger price for a standalone stop-loss order on an existing position (requires params.positionId)
params.positionIdstringNothe id of the position the standalone stopLossPrice/takeProfitPrice order is attached to
params.trade_currencystringNothe settlement currency for the order
mudrex.createOrder (symbol, type, side, amount, price?, params?)

editOrder

edit a trade order

Kind: instance method of mudrex
Returns: object - an order structure

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market to edit an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatNohow much of the currency you want to trade in units of the base currency
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.editOrder (id, symbol, type, side, amount?, price?, params?)

cancelOrder

cancels an open order

Kind: instance method of mudrex
Returns: object - An order structure

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNounified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.cancelOrder (id, symbol?, params?)

fetchOrder

fetches information on an order made by the user

Kind: instance method of mudrex
Returns: object - An order structure

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
idstringYesthe order id
symbolstringNounified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.fetchOrder (id, symbol?, params?)

fetchOrders

fetches information on multiple orders made by the user

Kind: instance method of mudrex
Returns: Array<Order> - a list of order structures

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolstringNounified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.fetchOrders (symbol?, since?, limit?, params?)

fetchOpenOrders

fetch all unfilled currently open orders

Kind: instance method of mudrex
Returns: Array<Order> - a list of order structures

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolstringNounified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.fetchOpenOrders (symbol?, since?, limit?, params?)

fetchClosedOrders

fetches information on multiple closed orders made by the user

Kind: instance method of mudrex
Returns: Array<Order> - a list of order structures

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolstringNounified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.fetchClosedOrders (symbol?, since?, limit?, params?)

fetchPositions

fetch all open positions

Kind: instance method of mudrex
Returns: Array<object> - a list of position structures

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.trade_currencystringNothe settlement currency to query positions for
mudrex.fetchPositions (symbols?, params?)

fetchPositionsHistory

fetches the history of closed positions

Kind: instance method of mudrex
Returns: Array<object> - a list of position structures

See: https://docs.trade.mudrex.com/docs/get-position-history

ParamTypeRequiredDescription
symbolsArray<string>Noa list of unified market symbols
sinceintNothe earliest time in ms to fetch positions for
limitintNothe maximum number of position structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.trade_currencystringNothe settlement currency to filter positions by
mudrex.fetchPositionsHistory (symbols?, since?, limit?, params?)

closePosition

closes an open position for a market

Kind: instance method of mudrex
Returns: object - an order structure

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
sidestringNo'buy' or 'sell', not required by mudrex
paramsobjectNoextra parameters specific to the exchange API endpoint
params.position_idstringNothe id of the position to close, resolved from the symbol if not provided
params.amountfloatNothe amount to close for a partial close, closes the whole position if not provided
mudrex.closePosition (symbol, side?, params?)

addMargin

add margin to a position

Kind: instance method of mudrex
Returns: object - a margin structure

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesamount of margin to add
paramsobjectNoextra parameters specific to the exchange API endpoint
params.position_idstringNothe id of the position to add margin to, resolved from the symbol if not provided
mudrex.addMargin (symbol, amount, params?)

reduceMargin

remove margin from a position

Kind: instance method of mudrex
Returns: object - a margin structure

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesthe amount of margin to remove
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.reduceMargin (symbol, amount, params?)

fetchMyTrades

fetch all trades made by the user

Kind: instance method of mudrex
Returns: Array<Trade> - a list of trade structures

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
symbolstringNounified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trade structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.trade_currencystringNothe settlement currency to filter trades by
mudrex.fetchMyTrades (symbol?, since?, limit?, params?)

transfer

transfer currency internally between wallets on the same account

Kind: instance method of mudrex
Returns: object - a transfer structure

See: https://docs.trade.mudrex.com/docs

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesamount to transfer
fromAccountstringYes'spot' or 'futures'
toAccountstringYes'spot' or 'futures'
paramsobjectNoextra parameters specific to the exchange API endpoint
mudrex.transfer (code, amount, fromAccount, toAccount, params?)

On this page