Back to Ccxt

Pacifica

wiki/exchanges/pacifica.md

4.5.5256.5 KB
Original Source

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

pacifica{docsify-ignore}

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

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

fetchMarkets{docsify-ignore}

retrieves data on all markets for pacifica

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

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

<a name="fetchSwapMarkets" id="fetchswapmarkets"></a>

fetchSwapMarkets{docsify-ignore}

retrieves data on all swap markets for pacifica

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

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
pacifica.fetchSwapMarkets ([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>pacifica</code>
Returns: <code>object</code> - a balance structure

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
javascript
pacifica.fetchBalance ([params])

<a name="fetchLeverage" id="fetchleverage"></a>

fetchLeverage{docsify-ignore}

fetch the set leverage for a market

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - a leverage structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
javascript
pacifica.fetchLeverage (symbol[, params])

<a name="fetchAccountSettings" id="fetchaccountsettings"></a>

fetchAccountSettings{docsify-ignore}

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

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

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
javascript
pacifica.fetchAccountSettings ([params])

<a name="fetchMarginMode" id="fetchmarginmode"></a>

fetchMarginMode{docsify-ignore}

fetches the margin mode of the trading pair

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - a margin mode structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the margin mode for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
javascript
pacifica.fetchMarginMode (symbol[, 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>pacifica</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

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

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
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.aggLevel<code>int</code>Noaggregation level for price grouping. Defaults to 1. Can be 1, 10, 100, 1000, 10000
javascript
pacifica.fetchOrderBook (symbol[, limit, params])

<a name="fetchFundingRates" id="fetchfundingrates"></a>

fetchFundingRates{docsify-ignore}

retrieves data on all swap markets for pacifica

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
pacifica.fetchFundingRates ([symbols, 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>pacifica</code>
Returns: <code>Array<Array<int>></code> - 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
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, support '1m', '3m', '5m', '15m', '30m', '1h', '2h', '4h', '8h', '12h', '1d'
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>Notimestamp in ms of the latest candle to fetch. 'limit' is priority
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params
javascript
pacifica.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>pacifica</code>
Returns: <code>Array<Trade></code> - a list of trade structures

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

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
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
pacifica.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>pacifica</code>
Returns: <code>Array<Trade></code> - a list of trade structures

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

ParamTypeRequiredDescription
symbol<code>string</code>Nounified 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
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest trade
params.account<code>string</code>Nowill default to walletAddress if not provided
params.cursor<code>string</code>Nopagination cursor from prev request (manual use)
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
pacifica.fetchMyTrades ([symbol, since, limit, params])

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

createOrder{docsify-ignore}

create a trade order

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

See

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. Not used for set tpsl order!
price<code>float</code>Nothe price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.triggerPrice<code>float</code>NoThe price a trigger order is triggered at
params.stopLossPrice<code>float</code>Nothe price that a stop loss order is triggered at (optional provide stopLossCloid)
params.takeProfitPrice<code>float</code>Nothe price that a take profit order is triggered at (optional provide takeProfitCloid)
params.timeInForce<code>string</code>No"GTC", "IOC", or "PO" or "ALO" or "PO_TOB" (or "TOB" - PO by top of book)
params.reduceOnly<code>boolean</code>NoEnsures that the executed order does not flip the opened position.
params.clientOrderId<code>string</code>Noclient order id, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindow<code>int</code>Notime to live in milliseconds
javascript
pacifica.createOrder (symbol, type, side, amount[, price, params])

<a name="createOrders" id="createorders"></a>

createOrders{docsify-ignore}

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

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

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

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type (optional or 'limit'), side, amount, price and params
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
pacifica.createOrders (orders[, params])

<a name="cancelOrders" id="cancelorders"></a>

cancelOrders{docsify-ignore}

cancel multiple orders

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - an list of order structures

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

ParamTypeRequiredDescription
ids<code>Array<string></code>Yesorder ids. An ids list is always required (can be empty). Both ids and clientOrderIds can be passed simultaneously.
symbol<code>string</code>Nounified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.clientOrderIds<code>string</code>, <code>Array<string></code>Noclient order ids, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindow<code>int</code>Notime to live in milliseconds
javascript
pacifica.cancelOrders (ids[, symbol, params])

<a name="cancelAllOrders" id="cancelallorders"></a>

cancelAllOrders{docsify-ignore}

cancel all open orders in a market

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yes(optional) unified market symbol of the market to cancel orders in.
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.excludeReduceOnly<code>boolean</code>Nowhether to exclude reduce-only orders
params.expiryWindow<code>int</code>Notime to live in milliseconds
javascript
pacifica.cancelAllOrders (symbol[, params])

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

cancelOrder{docsify-ignore}

cancels an open order

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

See

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.stop<code>boolean</code>Nonecessary if this is to cancel a stop order.
params.clientOrderId<code>string</code>Noclient order id, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindow<code>int</code>Notime to live in milliseconds
javascript
pacifica.cancelOrder (id, symbol[, params])

<a name="editOrder" id="editorder"></a>

editOrder{docsify-ignore}

edit a trade order

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

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

ParamTypeRequiredDescription
id<code>string</code>Yesedit order id
symbol<code>string</code>Yesunified symbol of the market to edit an order in
type<code>string</code>Yes'market' or 'limit' WARN is not usable!
side<code>string</code>Yes'buy' or 'sell' WARN is not usable!
amount<code>float</code>Yeshow much of currency you want to trade in units of base currency
price<code>float</code>Yesthe price at which the order is to be fulfilled, in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.clientOrderId<code>string</code>Noclient order id, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindow<code>int</code>Notime to live in milliseconds
javascript
pacifica.editOrder (id, symbol, type, side, amount, price[, params])

<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>

fetchFundingRateHistory{docsify-ignore}

fetches historical funding rate prices

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the funding rate history for
since<code>int</code>Notimestamp in ms of the earliest funding rate to fetch
limit<code>int</code>Nothe maximum amount of funding rate structures to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.cursor<code>string</code>Nopagination cursor from prev request (manual use)
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
pacifica.fetchFundingRateHistory (symbol[, since, 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>pacifica</code>
Returns: <code>object</code> - a dictionary of ticker structures

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

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

<a name="fetchClosedOrders" id="fetchclosedorders"></a>

fetchClosedOrders{docsify-ignore}

fetch all unfilled currently closed orders

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

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 orders structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
javascript
pacifica.fetchClosedOrders (symbol[, since, limit, params])

<a name="fetchCanceledOrders" id="fetchcanceledorders"></a>

fetchCanceledOrders{docsify-ignore}

fetch all canceled orders

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

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 orders structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
javascript
pacifica.fetchCanceledOrders (symbol[, since, limit, params])

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

fetchCanceledAndClosedOrders{docsify-ignore}

fetch all closed and canceled orders

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

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 orders structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
javascript
pacifica.fetchCanceledAndClosedOrders (symbol[, since, limit, params])

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

fetchOpenOrders{docsify-ignore}

fetch all unfilled currently open orders

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

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

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 orders structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
javascript
pacifica.fetchOpenOrders (symbol[, since, limit, params])

<a name="fetchOrders" id="fetchorders"></a>

fetchOrders{docsify-ignore}

fetch all orders

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

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

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 orders structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
params.cursor<code>string</code>Nopagination cursor from prev request (manual use)
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
pacifica.fetchOrders (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>pacifica</code>
Returns: <code>object</code> - An order structure

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

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yes(optional) unified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
pacifica.fetchOrder (id, symbol[, params])

<a name="fetchPosition" id="fetchposition"></a>

fetchPosition{docsify-ignore}

fetch data on an open position

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - a position structure

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the position is held in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
javascript
pacifica.fetchPosition (symbol[, params])

<a name="fetchPositions" id="fetchpositions"></a>

fetchPositions{docsify-ignore}

fetch all open positions

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

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
javascript
pacifica.fetchPositions ([symbols, params])

<a name="setMarginMode" id="setmarginmode"></a>

setMarginMode{docsify-ignore}

set margin mode (symbol)

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - response from the exchange

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

ParamTypeRequiredDescription
marginMode<code>string</code>Yesmargin mode must be either [isolated, cross]
symbol<code>string</code>Yesunified market symbol of the market the position is held in, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.expiryWindow<code>int</code>Notime to live in milliseconds
javascript
pacifica.setMarginMode (marginMode, symbol[, params])

<a name="setLeverage" id="setleverage"></a>

setLeverage{docsify-ignore}

set the level of leverage for a market

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - response from the exchange

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

ParamTypeRequiredDescription
leverage<code>float</code>Yesthe rate of leverage
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.expiryWindow<code>int</code>Notime to live in milliseconds
javascript
pacifica.setLeverage (leverage, symbol[, params])

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

withdraw{docsify-ignore}

make a withdrawal (only support native USDC)

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - a transaction structure

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesthe amount to withdraw
address<code>string</code>Yesthe address to withdraw to
tag<code>string</code>Yes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.expiryWindow<code>int</code>Notime to live in milliseconds
javascript
pacifica.withdraw (code, amount, address, tag[, params])

<a name="fetchTradingFee" id="fetchtradingfee"></a>

fetchTradingFee{docsify-ignore}

fetch the trading fees for a market

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - a fee structure

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
javascript
pacifica.fetchTradingFee (symbol[, params])

<a name="fetchOpenInterests" id="fetchopeninterests"></a>

fetchOpenInterests{docsify-ignore}

Retrieves the open interest for a list of symbols

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - an open interest structurehttps://docs.ccxt.com/?id=open-interest-structure

ParamTypeRequiredDescription
symbols<code>Array<string></code>NoUnified CCXT market symbol
params<code>object</code>Noexchange specific parameters
javascript
pacifica.fetchOpenInterests ([symbols, params])

<a name="fetchOpenInterest" id="fetchopeninterest"></a>

fetchOpenInterest{docsify-ignore}

retrieves the open interest of a contract trading pair

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - an open interest structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified CCXT market symbol
params<code>object</code>Noexchange specific parameters
javascript
pacifica.fetchOpenInterest (symbol[, 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>pacifica</code>
Returns: <code>object</code> - a ledger structure

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

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Notimestamp in ms of the earliest ledger entry
limit<code>int</code>Nomax number of ledger entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
params.cursor<code>string</code>Nopagination cursor from prev request (manual use)
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
pacifica.fetchLedger ([code, since, limit, params])

<a name="fetchFundingHistory" id="fetchfundinghistory"></a>

fetchFundingHistory{docsify-ignore}

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

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - a funding history structure

ParamTypeRequiredDescription
symbol<code>string</code>Nounified market symbol
since<code>int</code>Nothe earliest time in ms to fetch funding history for
limit<code>int</code>Nothe maximum number of funding history structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
params.cursor<code>string</code>Nopagination cursor from prev request
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
javascript
pacifica.fetchFundingHistory ([symbol, since, limit, params])

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

transfer{docsify-ignore}

transfer currency internally between wallets on the same account

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - a transfer structure

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesamount to transfer
fromAccount<code>string</code>Yesaccount to transfer from spot, swap
toAccount<code>string</code>Yesaccount to transfer to swap, spot or address
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.expiryWindow<code>int</code>Notime to live in milliseconds
javascript
pacifica.transfer (code, amount, fromAccount, toAccount[, params])

<a name="createSubAccount" id="createsubaccount"></a>

createSubAccount{docsify-ignore}

creates a sub-account under the main account

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - a response object

ParamTypeRequiredDescription
name<code>string</code>Yesunused argument
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.expiryWindow<code>int</code>Notime to live in milliseconds
params.subAccountAddress<code>string</code>NoThe public key (address) of the sub-account to use for creation
params.subAccountPrivateKey<code>string</code>NoThe private key of the sub-account to use for creation
javascript
pacifica.createSubAccount (name[, params])

<a name="createOrderWs" id="createorderws"></a>

createOrderWs{docsify-ignore}

create a trade order

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

See

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 fullfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.triggerPrice<code>float</code>NoThe price a trigger order is triggered at
params.stopLossPrice<code>float</code>, <code>undefined</code>Nothe price that a stop loss order is triggered at (optional provide stopLossCloid)
params.takeProfitPrice<code>float</code>, <code>undefined</code>Nothe price that a take profit order is triggered at (optional provide takeProfitCloid)
params.timeInForce<code>string</code>, <code>undefined</code>No"GTC", "IOC", or "PO" or "ALO" or "PO_TOB" (or "TOB" - PO by top of book)
params.reduceOnly<code>bool</code>, <code>undefined</code>NoEnsures that the executed order does not flip the opened position.
params.clientOrderId<code>string</code>, <code>undefined</code>Noclient order id, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindow<code>int</code>, <code>undefined</code>Notime to live in milliseconds
params.agentAddress<code>string</code>, <code>undefined</code>Noonly if agent wallet in use.
params.originAddress<code>string</code>, <code>undefined</code>Noonly if agent in use. Agent's owner address ( default = credentials walletAddress )
javascript
pacifica.createOrderWs (symbol, type, side, amount[, price, params])

<a name="editOrderWs" id="editorderws"></a>

editOrderWs{docsify-ignore}

edit a trade order

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

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

ParamTypeRequiredDescription
id<code>string</code>Yesedit order id
symbol<code>string</code>Yesunified symbol of the market to edit 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>Yesthe price at which the order is to be fulfilled, in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.clientOrderId<code>string</code>Noclient order id, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindow<code>int</code>, <code>undefined</code>Notime to live in milliseconds
params.agentAddress<code>string</code>, <code>undefined</code>Noonly if agent wallet in use
params.originAddress<code>string</code>, <code>undefined</code>Noonly if agent in use. Agent's owner address ( default = credentials walletAddress )
javascript
pacifica.editOrderWs (id, symbol, type, side, amount, price[, params])

<a name="cancelOrdersWs" id="cancelordersws"></a>

cancelOrdersWs{docsify-ignore}

cancel multiple orders

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - an list of order structures

See

ParamTypeRequiredDescription
ids<code>Array<string></code>Yesorder ids
symbol<code>string</code>Nounified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.clientOrderId<code>string</code>, <code>Array<string></code>Noclient order ids, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindow<code>int</code>, <code>undefined</code>Notime to live in milliseconds
params.agentAddress<code>string</code>, <code>undefined</code>Noonly if agent wallet in use
params.originAddress<code>string</code>, <code>undefined</code>Noonly if agent in use. Agent's owner address ( default = credentials walletAddress )
javascript
pacifica.cancelOrdersWs (ids[, symbol, params])

<a name="cancelOrderWs" id="cancelorderws"></a>

cancelOrderWs{docsify-ignore}

cancels an open order

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

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

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.stop<code>bool</code>, <code>undefined</code>Nonecessary if this is to cancel a stop order.
params.clientOrderId<code>string</code>, <code>undefined</code>Noclient order id, (optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479)
params.expiryWindow<code>int</code>, <code>undefined</code>Notime to live in milliseconds
params.agentAddress<code>string</code>, <code>undefined</code>Noonly if agent wallet in use
params.originAddress<code>string</code>, <code>undefined</code>Noonly if agent in use. Agent's owner address ( default = credentials walletAddress )
javascript
pacifica.cancelOrderWs (id, symbol[, params])

<a name="cancelAllOrdersWs" id="cancelallordersws"></a>

cancelAllOrdersWs{docsify-ignore}

cancel all open orders in a market

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yes(optional) unified market symbol of the market to cancel orders in.
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.excludeReduceOnly<code>boolean</code>, <code>undefined</code>Nowhether to exclude reduce-only orders
params.expiryWindow<code>int</code>, <code>undefined</code>Notime to live in milliseconds
params.agentAddress<code>string</code>, <code>undefined</code>Noonly if agent wallet in use
params.originAddress<code>string</code>, <code>undefined</code>Noonly if agent in use. Agent's owner address ( default = credentials walletAddress )
javascript
pacifica.cancelAllOrdersWs (symbol[, params])

<a name="watchOrderBook" id="watchorderbook"></a>

watchOrderBook{docsify-ignore}

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

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

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

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
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.aggLevel<code>int</code>, <code>undefined</code>Noaggregation level for price grouping. Defaults to 1. Can be 1, 10, 100, 1000, 10000
javascript
pacifica.watchOrderBook (symbol[, limit, params])

<a name="unWatchOrderBook" id="unwatchorderbook"></a>

unWatchOrderBook{docsify-ignore}

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

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.aggLevel<code>int</code>, <code>undefined</code>Noaggregation level for price grouping. Defaults to 1. Can be 1, 10, 100, 1000, 10000
javascript
pacifica.unWatchOrderBook (symbol[, params])

<a name="watchTicker" id="watchticker"></a>

watchTicker{docsify-ignore}

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

Kind: instance method of <code>pacifica</code>
Returns: <code>object</code> - a ticker structure

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
pacifica.watchTicker (symbol[, params])

<a name="watchTickers" id="watchtickers"></a>

watchTickers{docsify-ignore}

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 <code>pacifica</code>
Returns: <code>object</code> - a ticker structure

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
pacifica.watchTickers (symbols[, params])

<a name="unWatchTickers" id="unwatchtickers"></a>

unWatchTickers{docsify-ignore}

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 <code>pacifica</code>
Returns: <code>object</code> - a ticker structure

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
pacifica.unWatchTickers (symbols[, params])

<a name="watchMyTrades" id="watchmytrades"></a>

watchMyTrades{docsify-ignore}

watches information on multiple trades made by the user

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

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

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
params.account<code>string</code>, <code>undefined</code>Nowill default to options' walletAddress if not provided
javascript
pacifica.watchMyTrades (symbol[, since, limit, params])

<a name="unWatchMyTrades" id="unwatchmytrades"></a>

unWatchMyTrades{docsify-ignore}

unWatches information on multiple trades made by the user

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>, <code>undefined</code>Nowill default to options' walletAddress if not provided
javascript
pacifica.unWatchMyTrades (symbol[, params])

<a name="watchTrades" id="watchtrades"></a>

watchTrades{docsify-ignore}

watches information on multiple trades made in a market

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

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

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

<a name="unWatchTrades" id="unwatchtrades"></a>

unWatchTrades{docsify-ignore}

unWatches information on multiple trades made in a market

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market trades were made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
pacifica.unWatchTrades (symbol[, params])

<a name="watchOHLCV" id="watchohlcv"></a>

watchOHLCV{docsify-ignore}

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

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

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

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

<a name="unWatchOHLCV" id="unwatchohlcv"></a>

unWatchOHLCV{docsify-ignore}

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

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

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

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
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
pacifica.unWatchOHLCV (symbol, timeframe[, params])

<a name="watchOrders" id="watchorders"></a>

watchOrders{docsify-ignore}

watches information on multiple orders made by the user

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

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

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
params.account<code>string</code>, <code>undefined</code>Nowill default to options' walletAddress if not provided
javascript
pacifica.watchOrders (symbol[, since, limit, params])

<a name="unWatchOrders" id="unwatchorders"></a>

unWatchOrders{docsify-ignore}

unWatches information on multiple orders made by the user

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>, <code>undefined</code>Nowill default to options' walletAddress if not provided
javascript
pacifica.unWatchOrders (symbol[, params])