CCXT

pacifica

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

pacifica

Kind: global class
Extends: Exchange

fetchMarkets

retrieves data on all markets for pacifica

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

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

fetchSwapMarkets

retrieves data on all swap markets for pacifica

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/markets/get-market-info

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
pacifica.fetchSwapMarkets (params?)

fetchBalance

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

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/account/get-account-info

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
pacifica.fetchBalance (params?)

fetchLeverage

fetch the set leverage for a market

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
pacifica.fetchLeverage (symbol, params?)

fetchAccountSettings

fetch account's market settings. Settings are cached for walletAddress. To refresh the cache, call loadAccountSettings with refresh=true

Kind: instance method of pacifica
Returns: object - Dict repacked from list by symbol key

See: https://docs.pacifica.fi/api-documentation/api/rest-api/account/get-account-settings

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
pacifica.fetchAccountSettings (params?)

fetchMarginMode

fetches the margin mode of the trading pair

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the margin mode for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
pacifica.fetchMarginMode (symbol, params?)

fetchOrderBook

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

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/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
params.aggLevelintNoaggregation level for price grouping. Defaults to 1. Can be 1, 10, 100, 1000, 10000
pacifica.fetchOrderBook (symbol, limit?, params?)

fetchFundingRates

retrieves data on all swap markets for pacifica

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

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

fetchOHLCV

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

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/markets/get-candle-data

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents, support '1m', '3m', '5m', '15m', '30m', '1h', '2h', '4h', '8h', '12h', '1d'
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. 'limit' is priority
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](/docs/manual#pagination-params
pacifica.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchTrades

get the list of most recent trades for a particular symbol

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/markets/get-recent-trades

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
pacifica.fetchTrades (symbol, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/account/get-trade-history

ParamTypeRequiredDescription
symbolstringNounified 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.untilintNotimestamp in ms of the latest trade
params.accountstringNowill default to walletAddress if not provided
params.cursorstringNopagination cursor from prev request (manual use)
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
pacifica.fetchMyTrades (symbol?, since?, limit?, params?)

createOrder

create a trade order

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

See

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. Not used for set tpsl order!
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.triggerPricefloatNoThe price a trigger order is triggered at
params.stopLossPricefloatNothe price that a stop loss order is triggered at (optional provide stopLossCloid)
params.takeProfitPricefloatNothe price that a take profit order is triggered at (optional provide takeProfitCloid)
params.timeInForcestringNo"GTC", "IOC", or "PO" or "ALO" or "PO_TOB" (or "TOB" - PO by top of book)
params.reduceOnlybooleanNoEnsures that the executed order does not flip the opened position.
params.clientOrderIdstringNoclient order id, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindowintNotime to live in milliseconds
pacifica.createOrder (symbol, type, side, amount, price?, params?)

createOrders

create a list of trade orders. It is supports only limit orders and have a random jitter ~100-300ms!

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/orders/batch-order

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

cancelOrders

cancel multiple orders

Kind: instance method of pacifica
Returns: object - an list of order structures

See: https://docs.pacifica.fi/api-documentation/api/rest-api/orders/batch-order

ParamTypeRequiredDescription
idsArray<string>Yesorder ids. An ids list is always required (can be empty). Both ids and clientOrderIds can be passed simultaneously.
symbolstringNounified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdsstring, Array<string>Noclient order ids, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindowintNotime to live in milliseconds
pacifica.cancelOrders (ids, symbol?, params?)

cancelAllOrders

cancel all open orders in a market

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/orders/cancel-all-orders

ParamTypeRequiredDescription
symbolstringYes(optional) unified market symbol of the market to cancel orders in.
paramsobjectNoextra parameters specific to the exchange API endpoint
params.excludeReduceOnlybooleanNowhether to exclude reduce-only orders
params.expiryWindowintNotime to live in milliseconds
pacifica.cancelAllOrders (symbol, params?)

cancelOrder

cancels an open order

Kind: instance method of pacifica
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.stopbooleanNonecessary if this is to cancel a stop order.
params.clientOrderIdstringNoclient order id, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindowintNotime to live in milliseconds
pacifica.cancelOrder (id, symbol, params?)

editOrder

edit a trade order

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/orders/edit-order

ParamTypeRequiredDescription
idstringYesedit order id
symbolstringYesunified symbol of the market to edit an order in
typestringYes'market' or 'limit' WARN is not usable!
sidestringYes'buy' or 'sell' WARN is not usable!
amountfloatYeshow much of currency you want to trade in units of 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.clientOrderIdstringNoclient order id, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindowintNotime to live in milliseconds
pacifica.editOrder (id, symbol, type, side, amount, price, params?)

fetchFundingRateHistory

fetches historical funding rate prices

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/markets/get-historical-funding

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 to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.cursorstringNopagination cursor from prev request (manual use)
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
pacifica.fetchFundingRateHistory (symbol, 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 pacifica
Returns: object - a dictionary of ticker structures

See: https://docs.pacifica.fi/api-documentation/api/rest-api/markets/get-prices

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
pacifica.fetchTickers (symbols?, params?)

fetchClosedOrders

fetch all unfilled currently closed orders

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
pacifica.fetchClosedOrders (symbol, since?, limit?, params?)

fetchCanceledOrders

fetch all canceled orders

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
pacifica.fetchCanceledOrders (symbol, since?, limit?, params?)

fetchCanceledAndClosedOrders

fetch all closed and canceled orders

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
pacifica.fetchCanceledAndClosedOrders (symbol, since?, limit?, params?)

fetchOpenOrders

fetch all unfilled currently open orders

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/orders/get-open-orders

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
pacifica.fetchOpenOrders (symbol, since?, limit?, params?)

fetchOrders

fetch all orders

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/orders/get-order-history

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
params.cursorstringNopagination cursor from prev request (manual use)
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
pacifica.fetchOrders (symbol, since?, limit?, params?)

fetchOrder

fetches information on an order made by the user

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/orders/get-order-history-by-id

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYes(optional) unified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
pacifica.fetchOrder (id, symbol, params?)

fetchPosition

fetch data on an open position

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/account/get-positions

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the position is held in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
pacifica.fetchPosition (symbol, params?)

fetchPositions

fetch all open positions

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/account/get-positions

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
pacifica.fetchPositions (symbols?, params?)

setMarginMode

set margin mode (symbol)

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/account/update-margin-mode

ParamTypeRequiredDescription
marginModestringYesmargin mode must be either [isolated, cross]
symbolstringYesunified market symbol of the market the position is held in, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.expiryWindowintNotime to live in milliseconds
pacifica.setMarginMode (marginMode, symbol, params?)

setLeverage

set the level of leverage for a market

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/account/update-leverage

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.expiryWindowintNotime to live in milliseconds
pacifica.setLeverage (leverage, symbol, params?)

withdraw

make a withdrawal (only support native USDC)

Kind: instance method of pacifica
Returns: object - a transaction structure

See: https://docs.pacifica.fi/api-documentation/api/rest-api/account/request-withdrawal

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to withdraw
addressstringYesthe address to withdraw to
tagstringYes
paramsobjectNoextra parameters specific to the exchange API endpoint
params.expiryWindowintNotime to live in milliseconds
pacifica.withdraw (code, amount, address, tag, params?)

fetchTradingFee

fetch the trading fees for a market

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/account/get-account-info

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
pacifica.fetchTradingFee (symbol, params?)

fetchOpenInterests

Retrieves the open interest for a list of symbols

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

ParamTypeRequiredDescription
symbolsArray<string>NoUnified CCXT market symbol
paramsobjectNoexchange specific parameters
pacifica.fetchOpenInterests (symbols?, params?)

fetchOpenInterest

retrieves the open interest of a contract trading pair

Kind: instance method of pacifica
Returns: object - an open interest structure

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

fetchLedger

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

Kind: instance method of pacifica
Returns: object - a ledger structure

See: https://docs.pacifica.fi/api-documentation/api/rest-api/account/get-account-balance-history

ParamTypeRequiredDescription
codestringNounified currency code
sinceintNotimestamp in ms of the earliest ledger entry
limitintNomax number of ledger entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
params.cursorstringNopagination cursor from prev request (manual use)
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
pacifica.fetchLedger (code?, since?, limit?, params?)

fetchFundingHistory

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

Kind: instance method of pacifica
Returns: object - a funding history structure

ParamTypeRequiredDescription
symbolstringNounified 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.accountstringNowill default to walletAddress if not provided
params.cursorstringNopagination cursor from prev request
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
pacifica.fetchFundingHistory (symbol?, since?, limit?, params?)

transfer

transfer currency internally between wallets on the same account

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

See: https://docs.pacifica.fi/api-documentation/api/rest-api/subaccounts/subaccount-fund-transfer

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesamount to transfer
fromAccountstringYesaccount to transfer from spot, swap
toAccountstringYesaccount to transfer to swap, spot or address
paramsobjectNoextra parameters specific to the exchange API endpoint
params.expiryWindowintNotime to live in milliseconds
pacifica.transfer (code, amount, fromAccount, toAccount, params?)

createSubAccount

creates a sub-account under the main account

Kind: instance method of pacifica
Returns: object - a response object

ParamTypeRequiredDescription
namestringYesunused argument
paramsobjectNoextra parameters specific to the exchange API endpoint
params.expiryWindowintNotime to live in milliseconds
params.subAccountAddressstringNoThe public key (address) of the sub-account to use for creation
params.subAccountPrivateKeystringNoThe private key of the sub-account to use for creation
pacifica.createSubAccount (name, params?)

createOrderWs

create a trade order

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

See

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.triggerPricefloatNoThe price a trigger order is triggered at
params.stopLossPricefloat, undefinedNothe price that a stop loss order is triggered at (optional provide stopLossCloid)
params.takeProfitPricefloat, undefinedNothe price that a take profit order is triggered at (optional provide takeProfitCloid)
params.timeInForcestring, undefinedNo"GTC", "IOC", or "PO" or "ALO" or "PO_TOB" (or "TOB" - PO by top of book)
params.reduceOnlybool, undefinedNoEnsures that the executed order does not flip the opened position.
params.clientOrderIdstring, undefinedNoclient order id, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindowint, undefinedNotime to live in milliseconds
params.agentAddressstring, undefinedNoonly if agent wallet in use.
params.originAddressstring, undefinedNoonly if agent in use. Agent's owner address ( default = credentials walletAddress )
pacifica.createOrderWs (symbol, type, side, amount, price?, params?)

editOrderWs

edit a trade order

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/trading-operations/edit-order

ParamTypeRequiredDescription
idstringYesedit order id
symbolstringYesunified symbol of the market to edit an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of currency you want to trade in units of 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.clientOrderIdstringNoclient order id, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindowint, undefinedNotime to live in milliseconds
params.agentAddressstring, undefinedNoonly if agent wallet in use
params.originAddressstring, undefinedNoonly if agent in use. Agent's owner address ( default = credentials walletAddress )
pacifica.editOrderWs (id, symbol, type, side, amount, price, params?)

cancelOrdersWs

cancel multiple orders

Kind: instance method of pacifica
Returns: object - an list of order structures

See

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringNounified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstring, Array<string>Noclient order ids, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindowint, undefinedNotime to live in milliseconds
params.agentAddressstring, undefinedNoonly if agent wallet in use
params.originAddressstring, undefinedNoonly if agent in use. Agent's owner address ( default = credentials walletAddress )
pacifica.cancelOrdersWs (ids, symbol?, params?)

cancelOrderWs

cancels an open order

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/trading-operations/cancel-order

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.stopbool, undefinedNonecessary if this is to cancel a stop order.
params.clientOrderIdstring, undefinedNoclient order id, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindowint, undefinedNotime to live in milliseconds
params.agentAddressstring, undefinedNoonly if agent wallet in use
params.originAddressstring, undefinedNoonly if agent in use. Agent's owner address ( default = credentials walletAddress )
pacifica.cancelOrderWs (id, symbol, params?)

cancelAllOrdersWs

cancel all open orders in a market

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/trading-operations/cancel-all-orders

ParamTypeRequiredDescription
symbolstringYes(optional) unified market symbol of the market to cancel orders in.
paramsobjectNoextra parameters specific to the exchange API endpoint
params.excludeReduceOnlyboolean, undefinedNowhether to exclude reduce-only orders
params.expiryWindowint, undefinedNotime to live in milliseconds
params.agentAddressstring, undefinedNoonly if agent wallet in use
params.originAddressstring, undefinedNoonly if agent in use. Agent's owner address ( default = credentials walletAddress )
pacifica.cancelAllOrdersWs (symbol, params?)

watchOrderBook

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

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/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
params.aggLevelint, undefinedNoaggregation level for price grouping. Defaults to 1. Can be 1, 10, 100, 1000, 10000
pacifica.watchOrderBook (symbol, limit?, params?)

unWatchOrderBook

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

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/orderbook

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.aggLevelint, undefinedNoaggregation level for price grouping. Defaults to 1. Can be 1, 10, 100, 1000, 10000
pacifica.unWatchOrderBook (symbol, params?)

watchTicker

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

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/prices

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

watchTickers

watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/prices

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
pacifica.watchTickers (symbols, params?)

unWatchTickers

unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/prices

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
pacifica.unWatchTickers (symbols, params?)

watchMyTrades

watches information on multiple trades made by the user

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/account-trades

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.accountstring, undefinedNowill default to options' walletAddress if not provided
pacifica.watchMyTrades (symbol, since?, limit?, params?)

unWatchMyTrades

unWatches information on multiple trades made by the user

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/account-trades

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstring, undefinedNowill default to options' walletAddress if not provided
pacifica.unWatchMyTrades (symbol, params?)

watchTrades

watches information on multiple trades made in a market

Kind: instance method of pacifica
Returns: Array<object> - a list of trade structures

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/trades

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market trades were made in
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
pacifica.watchTrades (symbol, since?, limit?, params?)

unWatchTrades

unWatches information on multiple trades made in a market

Kind: instance method of pacifica
Returns: Array<object> - a list of trade structures

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/trades

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market trades were made in
paramsobjectNoextra parameters specific to the exchange API endpoint
pacifica.unWatchTrades (symbol, params?)

watchOHLCV

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

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/candle

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
pacifica.watchOHLCV (symbol, timeframe, since?, limit?, params?)

unWatchOHLCV

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

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/candle

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
paramsobjectNoextra parameters specific to the exchange API endpoint
pacifica.unWatchOHLCV (symbol, timeframe, params?)

watchOrders

watches information on multiple orders made by the user

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/account-order-updates

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.accountstring, undefinedNowill default to options' walletAddress if not provided
pacifica.watchOrders (symbol, since?, limit?, params?)

unWatchOrders

unWatches information on multiple orders made by the user

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

See: https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/account-order-updates

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstring, undefinedNowill default to options' walletAddress if not provided
pacifica.unWatchOrders (symbol, params?)

On this page