Skip to content

paradex()

github-actions[bot] edited this page Apr 6, 2026 · 1 revision

paradex{docsify-ignore}

Kind: global class
Extends: Exchange

paradex{docsify-ignore}

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{docsify-ignore}

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.api.testnet.paradex.trade/#get-system-time-unix-milliseconds

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
paradex.fetchTime ([params])

fetchStatus{docsify-ignore}

the latest known information on the availability of the exchange API

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

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

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
paradex.fetchStatus ([params])

fetchMarkets{docsify-ignore}

retrieves data on all markets for bitget

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

See: https://docs.api.testnet.paradex.trade/#list-available-markets

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
paradex.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 paradex
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://docs.api.testnet.paradex.trade/#ohlcv-for-a-symbol

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 timestamp in ms of the latest candle to fetch
paradex.fetchOHLCV (symbol, timeframe[, since, 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 paradex
Returns: object - a dictionary of ticker structures

See: https://docs.api.testnet.paradex.trade/#list-available-markets-summary

Param Type Required Description
symbols Array<string>, undefined Yes 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
paradex.fetchTickers (symbols[, params])

fetchTicker{docsify-ignore}

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.api.testnet.paradex.trade/#list-available-markets-summary

Param Type Required Description
symbol string Yes unified symbol of the market to fetch the ticker for
params object No extra parameters specific to the exchange API endpoint
paradex.fetchTicker (symbol[, params])

fetchOrderBook{docsify-ignore}

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.api.testnet.paradex.trade/#get-market-orderbook

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
params object No extra parameters specific to the exchange API endpoint
paradex.fetchOrderBook (symbol[, limit, params])

fetchTrades{docsify-ignore}

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.api.testnet.paradex.trade/#trade-tape

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
params object No extra parameters specific to the exchange API endpoint
params.until int No the latest time in ms to fetch trades for
params.paginate boolean No default false, when true will automatically paginate by calling this endpoint multiple times
paradex.fetchTrades (symbol[, since, limit, params])

fetchOpenInterest{docsify-ignore}

retrieves the open interest of a contract trading pair

Kind: instance method of paradex
Returns: object - an open interest structurehttps://docs.ccxt.com/#/?id=open-interest-structure

See: https://docs.api.testnet.paradex.trade/#list-available-markets-summary

Param Type Required Description
symbol string Yes unified CCXT market symbol
params object No exchange specific parameters
paradex.fetchOpenInterest (symbol[, params])

createOrder{docsify-ignore}

create a trade order

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

See: https://docs.api.prod.paradex.trade/#create-order

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 fullfilled, in units of the quote currency, ignored in market orders
params object No extra parameters specific to the exchange API endpoint
params.stopPrice float No alias for triggerPrice
params.triggerPrice float No The price a trigger order is triggered at
params.stopLossPrice float No the price that a stop loss order is triggered at
params.takeProfitPrice float No the price that a take profit order is triggered at
params.timeInForce string No "GTC", "IOC", or "POST_ONLY"
params.postOnly bool No true or false
params.reduceOnly bool No Ensures that the executed order does not flip the opened position.
params.clientOrderId string No a unique id for the order
paradex.createOrder (symbol, type, side, amount[, price, params])

cancelOrder{docsify-ignore}

cancels an open order

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

See

Param Type Required Description
id string Yes order id
symbol string Yes unified symbol of the market the order was made in
params object No extra parameters specific to the exchange API endpoint
params.clientOrderId string No a unique id for the order
paradex.cancelOrder (id, symbol[, params])

cancelAllOrders{docsify-ignore}

cancel all open orders in a market

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

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

Param Type Required Description
symbol string Yes unified market symbol of the market to cancel orders in
params object No extra parameters specific to the exchange API endpoint
paradex.cancelAllOrders (symbol[, params])

fetchOrder{docsify-ignore}

fetches information on an order made by the user

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

See

Param Type Required Description
id string Yes the order id
symbol string Yes unified symbol of the market the order was made in
params object No extra parameters specific to the exchange API endpoint
params.clientOrderId string No a unique id for the order
paradex.fetchOrder (id, symbol[, params])

fetchOrders{docsify-ignore}

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.api.prod.paradex.trade/#get-orders

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
params.side string No 'buy' or 'sell'
params.paginate boolean No set to true if you want to fetch orders with pagination
params.until int Yes timestamp in ms of the latest order to fetch
paradex.fetchOrders (symbol[, since, limit, params])

fetchOpenOrders{docsify-ignore}

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.api.prod.paradex.trade/#paradex-rest-api-orders

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
paradex.fetchOpenOrders (symbol[, since, limit, 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 paradex
Returns: object - a balance structure

See: https://docs.api.prod.paradex.trade/#list-balances

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
paradex.fetchBalance ([params])

fetchMyTrades{docsify-ignore}

fetch all trades made by the user

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

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

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
params object No extra parameters specific to the exchange API endpoint
params.paginate boolean No default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.until int No the latest time in ms to fetch entries for
paradex.fetchMyTrades (symbol[, since, limit, params])

fetchPosition{docsify-ignore}

fetch data on an open position

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

See: https://docs.api.prod.paradex.trade/#list-open-positions

Param Type Required Description
symbol string Yes unified market symbol of the market the position is held in
params object No extra parameters specific to the exchange API endpoint
paradex.fetchPosition (symbol[, params])

fetchPositions{docsify-ignore}

fetch all open positions

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

See: https://docs.api.prod.paradex.trade/#list-open-positions

Param Type Required Description
symbols Array<string> No list of unified market symbols
params object No extra parameters specific to the exchange API endpoint
paradex.fetchPositions ([symbols, params])

fetchLiquidations{docsify-ignore}

retrieves the public liquidations of a trading pair

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

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

Param Type Required Description
symbol string Yes unified CCXT market symbol
since int No the earliest time in ms to fetch liquidations for
limit int No the maximum number of liquidation structures to retrieve
params object No exchange specific parameters for the huobi api endpoint
params.until int No timestamp in ms of the latest liquidation
paradex.fetchLiquidations (symbol[, since, limit, params])

fetchTransfers{docsify-ignore}

fetch all deposits made to an account

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

See: https://docs.api.prod.paradex.trade/#paradex-rest-api-transfers

Param Type Required Description
code string Yes unified currency code
since int No the earliest time in ms to fetch deposits for
limit int No the maximum number of deposits structures to retrieve
params object No extra parameters specific to the exchange API endpoint
params.until int No the latest time in ms to fetch entries for
params.paginate boolean No default 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])

fetchWithdrawals{docsify-ignore}

fetch all withdrawals made from an account

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

See: https://docs.api.prod.paradex.trade/#paradex-rest-api-transfers

Param Type Required Description
code string Yes unified currency code
since int No the earliest time in ms to fetch withdrawals for
limit int No the maximum number of withdrawals structures to retrieve
params object No extra parameters specific to the exchange API endpoint
params.until int No the latest time in ms to fetch withdrawals for
params.paginate boolean No default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
paradex.fetchWithdrawals (code[, since, limit, params])

fetchMarginMode{docsify-ignore}

fetches the margin mode of a specific symbol

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

See: https://docs.api.testnet.paradex.trade/#get-account-margin-configuration

Param Type Required Description
symbol string Yes unified symbol of the market the order was made in
params object No extra parameters specific to the exchange API endpoint
paradex.fetchMarginMode (symbol[, params])

setMarginMode{docsify-ignore}

set margin mode to 'cross' or 'isolated'

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

See: https://docs.api.testnet.paradex.trade/#set-margin-configuration

Param Type Required Description
marginMode string Yes 'cross' or 'isolated'
symbol string Yes unified market symbol
params object No extra parameters specific to the exchange API endpoint
params.leverage float No the rate of leverage
paradex.setMarginMode (marginMode, symbol[, params])

fetchLeverage{docsify-ignore}

fetch the set leverage for a market

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

See: https://docs.api.testnet.paradex.trade/#get-account-margin-configuration

Param Type Required Description
symbol string Yes unified market symbol
params object No extra parameters specific to the exchange API endpoint
paradex.fetchLeverage (symbol[, params])

setLeverage{docsify-ignore}

set the level of leverage for a market

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

See: https://docs.api.testnet.paradex.trade/#set-margin-configuration

Param Type Required Description
leverage float Yes the rate of leverage
symbol string No unified market symbol (is mandatory for swap markets)
params object No extra parameters specific to the exchange API endpoint
params.marginMode string No 'cross' or 'isolated'
paradex.setLeverage (leverage[, symbol, params])

fetchGreeks{docsify-ignore}

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.api.testnet.paradex.trade/#list-available-markets-summary

Param Type Required Description
symbol string Yes unified symbol of the market to fetch greeks for
params object No extra parameters specific to the exchange API endpoint
paradex.fetchGreeks (symbol[, params])

fetchAllGreeks{docsify-ignore}

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.api.testnet.paradex.trade/#list-available-markets-summary

Param Type Required Description
symbols Array<string> No unified symbols of the markets to fetch greeks for, all markets are returned if not assigned
params object No extra parameters specific to the exchange API endpoint
paradex.fetchAllGreeks ([symbols, params])

fetchFundingRateHistory{docsify-ignore}

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

Param Type Required Description
symbol string Yes unified symbol of the market to fetch the funding rate history for
since int No timestamp in ms of the earliest funding rate to fetch
limit int No the maximum amount of funding rate structures
params object No extra parameters specific to the exchange API endpoint
params.until int No timestamp in ms of the latest funding rate to fetch
paradex.fetchFundingRateHistory (symbol[, since, limit, params])

Clone this wiki locally