CCXT

paradex

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

paradex

Kind: global class
Extends: Exchange

paradex

Paradex is a decentralized exchange built on the StarkWare layer 2 scaling solution. To access private methods you can either use the ETH public key and private key by setting (exchange.privateKey and exchange.walletAddress) or alternatively you can provide the startknet private key and public key by setting exchange.options['paradexAccount'] with add {"privateKey": A, "publicKey": B, "address": C}

paradex.paradex ()

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

Kind: instance method of paradex
Returns: int - the current integer timestamp in milliseconds from the exchange server

See: https://docs.paradex.trade/api/prod/system/get-time-unix-milliseconds

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
paradex.fetchTime (params?)

fetchStatus

the latest known information on the availability of the exchange API

Kind: instance method of paradex
Returns: object - a status structure

See: https://docs.paradex.trade/api/prod/system/get-state

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
paradex.fetchStatus (params?)

fetchMarkets

retrieves data on all markets for paradex

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

See: https://docs.paradex.trade/api/prod/markets/get-markets

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

fetchTradingFee

fetch the trading fees for a market

Kind: instance method of paradex
Returns: object - a fee structure

See: https://docs.paradex.trade/api/prod/markets/get-markets

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

fetchTradingFees

fetch the trading fees for multiple markets

Kind: instance method of paradex
Returns: object - a dictionary of fee structures indexed by market symbols

See: https://docs.paradex.trade/api/prod/markets/get-markets

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
paradex.fetchTradingFees (params?)

fetchOHLCV

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

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

See: https://docs.paradex.trade/api/prod/markets/klines

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"last", "mark", "index", default is "last"
paradex.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchTickers

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

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

See: https://docs.paradex.trade/api/prod/markets/get-markets-summary

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified 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
paradex.fetchTickers (symbols, 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 paradex
Returns: object - a ticker structure

See: https://docs.paradex.trade/api/prod/markets/get-markets-summary

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

fetchOrderBook

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

Kind: instance method of paradex
Returns: object - A dictionary of order book structures indexed by market symbols

See: https://docs.paradex.trade/api/prod/markets/get-orderbook

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
paradex.fetchOrderBook (symbol, limit?, params?)

fetchTrades

get the list of most recent trades for a particular symbol

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

See: https://docs.paradex.trade/api/prod/trades/trades

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch trades for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times
paradex.fetchTrades (symbol, since?, limit?, params?)

fetchOpenInterest

retrieves the open interest of a contract trading pair

Kind: instance method of paradex
Returns: object - an open interest structure/docs/manual#open-interest-structure

See: https://docs.paradex.trade/api/prod/markets/get-markets-summary

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
paramsobjectNoexchange specific parameters
paradex.fetchOpenInterest (symbol, params?)

createOrder

create a trade order

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

See: https://docs.paradex.trade/api/prod/orders/new

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of currency you want to trade in units of base currency
pricefloatNothe price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.stopPricefloatNoalias for triggerPrice
params.triggerPricefloatNoThe price a trigger order is triggered at
params.stopLossPricefloatNothe price that a stop loss order is triggered at
params.takeProfitPricefloatNothe price that a take profit order is triggered at
params.timeInForcestringNo"GTC", "IOC", or "POST_ONLY"
params.postOnlyboolNotrue or false
params.reduceOnlyboolNoEnsures that the executed order does not flip the opened position.
params.clientOrderIdstringNoa unique id for the order
paradex.createOrder (symbol, type, side, amount, price?, params?)

editOrder

edit an open limit order or TPSL order

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

See: https://docs.paradex.trade/api-reference/prod/orders/modify

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market to edit an order in
typestringYes'limit' or a TPSL order type
sidestringYes'buy' or 'sell'
amountfloatYeshow much of the currency you want to trade in units of the base currency
pricefloatYesthe price at which the order is to be fulfilled, in units of the quote currency
paramsobjectNoextra parameters specific to the exchange API endpoint
params.stopPricefloatNoalias for triggerPrice
params.triggerPricefloatNoThe price a trigger order is triggered at
paradex.editOrder (id, symbol, type, side, amount, price, params?)

createOrders

create a list of trade orders

Kind: instance method of paradex
Returns: Array<object> - a list of order structures

See: https://docs.paradex.trade/api/prod/orders/batch

ParamTypeRequiredDescription
ordersArrayYeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
paramsobjectNoextra parameters specific to the exchange API endpoint
paradex.createOrders (orders, params?)

cancelOrder

cancels an open order

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

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoa unique id for the order
paradex.cancelOrder (id, symbol, params?)

cancelOrders

cancel multiple orders

Kind: instance method of paradex
Returns: Array<object> - a list of order structures

See: https://docs.paradex.trade/api/prod/orders/cancel-batch

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringNounified market symbol, not used by paradex cancelOrders()
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdsArray<string>Noclient order ids
paradex.cancelOrders (ids, symbol?, params?)

cancelAllOrders

cancel all open orders in a market

Kind: instance method of paradex
Returns: Array<object> - a list of order structures

See: https://docs.paradex.trade/api/prod/orders/cancel-all

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market to cancel orders in
paramsobjectNoextra parameters specific to the exchange API endpoint
paradex.cancelAllOrders (symbol, params?)

fetchOrder

fetches information on an order made by the user

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

See

ParamTypeRequiredDescription
idstringYesthe order id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoa unique id for the order
paradex.fetchOrder (id, symbol, params?)

fetchOrders

fetches information on multiple orders made by the user

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

See: https://docs.paradex.trade/api/prod/orders/get-orders

ParamTypeRequiredDescription
symbolstringYesunified 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
params.sidestringNo'buy' or 'sell'
params.paginatebooleanNoset to true if you want to fetch orders with pagination
params.untilintYestimestamp in ms of the latest order to fetch
paradex.fetchOrders (symbol, since?, limit?, params?)

fetchOpenOrders

fetches information on multiple orders made by the user

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

See: https://docs.paradex.trade/api/prod/orders/get-open-orders

ParamTypeRequiredDescription
symbolstringYesunified 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
paradex.fetchOpenOrders (symbol, since?, limit?, params?)

fetchBalance

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

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

See: https://docs.paradex.trade/api/prod/account/get-balance

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
paradex.fetchBalance (params?)

fetchMyTrades

fetch all trades made by the user

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

See: https://docs.paradex.trade/api/prod/account/list-fills

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.untilintNothe latest time in ms to fetch entries for
paradex.fetchMyTrades (symbol, since?, limit?, params?)

fetchPosition

fetch data on an open position

Kind: instance method of paradex
Returns: object - a position structure

See: https://docs.paradex.trade/api/prod/account/get-positions

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the position is held in
paramsobjectNoextra parameters specific to the exchange API endpoint
paradex.fetchPosition (symbol, params?)

fetchPositions

fetch all open positions

Kind: instance method of paradex
Returns: Array<object> - a list of position structure

See: https://docs.paradex.trade/api/prod/account/get-positions

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
paradex.fetchPositions (symbols?, params?)

fetchMyLiquidations

retrieves the users liquidated positions

Kind: instance method of paradex
Returns: object - an array of liquidation structures

See: https://docs.paradex.trade/api/prod/liquidations/get-liquidations

ParamTypeRequiredDescription
symbolstringNounified CCXT market symbol
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters
params.untilintNotimestamp in ms of the latest liquidation
paradex.fetchMyLiquidations (symbol?, since?, limit?, params?)

fetchDeposits

fetch all deposits made to an account

Kind: instance method of paradex
Returns: Array<object> - a list of transaction structures

See: https://docs.paradex.trade/api/prod/transfers/get

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch deposits for
limitintNothe maximum number of deposits structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch entries for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
paradex.fetchDeposits (code, since?, limit?, params?)

fetchWithdrawals

fetch all withdrawals made from an account

Kind: instance method of paradex
Returns: Array<object> - a list of transaction structures

See: https://docs.paradex.trade/api/prod/transfers/get

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch withdrawals for
limitintNothe maximum number of withdrawals structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch withdrawals for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
paradex.fetchWithdrawals (code, since?, limit?, params?)

fetchTransfers

fetch a history of transfers made on an account

Kind: instance method of paradex
Returns: Array<object> - a list of transfer structures

See: https://docs.paradex.trade/api/prod/transfers/get

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch transfers for
limitintNothe maximum number of transfer structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch entries for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
paradex.fetchTransfers (code, since?, limit?, params?)

fetchMarginMode

fetches the margin mode of a specific symbol

Kind: instance method of paradex
Returns: object - a margin mode structure

See: https://docs.paradex.trade/api/prod/account/get-account-margin

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
paradex.fetchMarginMode (symbol, params?)

setMarginMode

set margin mode to 'cross' or 'isolated'

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

See: https://docs.paradex.trade/api/prod/account/upsert-account-margin

ParamTypeRequiredDescription
marginModestringYes'cross' or 'isolated'
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.leveragefloatNothe rate of leverage
paradex.setMarginMode (marginMode, symbol, params?)

fetchLeverage

fetch the set leverage for a market

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

See: https://docs.paradex.trade/api/prod/account/get-account-margin

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

setLeverage

set the level of leverage for a market

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

See: https://docs.paradex.trade/api/prod/account/upsert-account-margin

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringNounified market symbol (is mandatory for swap markets)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'cross' or 'isolated'
paradex.setLeverage (leverage, symbol?, params?)

fetchGreeks

fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract

Kind: instance method of paradex
Returns: object - a greeks structure

See: https://docs.paradex.trade/api/prod/markets/get-markets-summary

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch greeks for
paramsobjectNoextra parameters specific to the exchange API endpoint
paradex.fetchGreeks (symbol, params?)

fetchAllGreeks

fetches all option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract

Kind: instance method of paradex
Returns: object - a greeks structure

See: https://docs.paradex.trade/api/prod/markets/get-markets-summary

ParamTypeRequiredDescription
symbolsArray<string>Nounified symbols of the markets to fetch greeks for, all markets are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
paradex.fetchAllGreeks (symbols?, params?)

fetchFundingHistory

fetch the history of funding payments paid and received on this account

Kind: instance method of paradex
Returns: Array<object> - a list of funding history structures

See: https://docs.paradex.trade/api/prod/account/get-funding

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch funding history for
limitintNothe maximum number of funding history structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.cursorstringNoreturns the next paginated page
params.untilintNothe latest time in ms to fetch entries for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
paradex.fetchFundingHistory (symbol, since?, limit?, params?)

fetchFundingRateHistory

fetches historical funding rate prices

Kind: instance method of paradex
Returns: Array<object> - a list of funding rate structures

See: https://docs.paradex.trade/api/prod/markets/get-funding-data

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the funding rate history for
sinceintNotimestamp in ms of the earliest funding rate to fetch
limitintNothe maximum amount of funding rate structures
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest funding rate to fetch
paradex.fetchFundingRateHistory (symbol, since?, limit?, params?)

On this page