CCXT

bullish

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

bullish

Kind: global class
Extends: Exchange

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#tag--time

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

fetchCurrencies

fetches all available currencies on an exchange

Kind: instance method of bullish
Returns: object - an associative dictionary of currencies

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/assets

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bullish.fetchCurrencies (params?)

fetchMarkets

retrieves data on all markets for ace

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/markets

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

fetchOrderBook

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

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/markets/-symbol-/orderbook/hybrid

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

fetchTrades

get the list of most recent trades for a particular symbol

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

See

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

fetchMyTrades

fetch all trades made by the user

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/history/trades

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.untilintNothe latest time in ms to fetch trades for
params.orderIdstringNothe order id to fetch trades for
params.clientOrderIdstringNothe client order id to fetch trades for
params.tradingAccountIdstringNothe trading account id to fetch trades for
bullish.fetchMyTrades (symbol?, since?, limit?, params?)

fetchOrderTrades

fetch all the trades made from a single order

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/history/trades

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNothe client order id to fetch trades for
bullish.fetchOrderTrades (id, symbol, since?, limit?, params?)

fetchTicker

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

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/markets/-symbol-/tick

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

fetchOHLCV

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

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/markets/-symbol-/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 (max 100)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest entry
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
bullish.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchFundingRateHistory

fetches historical funding rate prices

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/history/markets/-symbol-/funding-rate

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the funding rate history for
sinceintNonot sent to exchange api, exchange api always returns the most recent data, only used to filter exchange response
limitintNothe maximum amount of funding rate structures to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
bullish.fetchFundingRateHistory (symbol, since?, limit?, params?)

fetchOrders

fetches information on multiple orders made by the user

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

See

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 (5, 25, 50, 100, default is 25)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest order to fetch
params.tradingAccountIdstringNothe trading account id (mandatory parameter)
params.orderIdstringNothe id of the order to fetch for
params.clientOrderIdstringNothe client id of the order to fetch for
params.statusstringNofilter by order status, 'OPEN', 'CANCELLED', 'CLOSED', 'REJECTED'
params.paginateboolNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
bullish.fetchOrders (symbol, since?, limit?, params?)

fetchOpenOrders

fetch all unfilled currently open orders

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#tag--history

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.tradingAccountIdstringYesthe trading account id (mandatory parameter)
bullish.fetchOpenOrders (symbol, since?, limit?, params?)

fetchCanceledOrders

fetches information on multiple canceled orders made by the user

Kind: instance method of bullish
Returns: object - a list of order structures

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#tag--orders

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the canceled orders
sinceintNotimestamp in ms of the earliest order
limitintNothe max number of canceled orders to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.tradingAccountIdstringNothe trading account id (mandatory parameter)
bullish.fetchCanceledOrders (symbol, since?, limit?, params?)

fetchClosedOrders

fetches information on multiple closed orders made by the user

Kind: instance method of bullish
Returns: object - a list of order structures

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#tag--orders

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the closed orders
sinceintNotimestamp in ms of the earliest order
limitintNothe max number of closed orders to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.tradingAccountIdstringYesthe trading account id (mandatory parameter)
bullish.fetchClosedOrders (symbol, since?, limit?, params?)

fetchCanceledAndClosedOrders

fetches information on multiple canceled orders made by the user

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#tag--history

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the closed orders
sinceintNotimestamp in ms of the earliest order
limitintNothe max number of closed orders to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.tradingAccountIdstringNothe trading account id (mandatory parameter)
bullish.fetchCanceledAndClosedOrders (symbol, since?, limit?, params?)

fetchOrder

fetches information on an order made by the user

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v2/orders/-orderId-

ParamTypeRequiredDescription
idstringYesthe order id
symbolstringNounified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.traidingAccountIdstringNothe trading account id (mandatory parameter)
bullish.fetchOrder (id, symbol?, params?)

createOrder

create a trade order

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#post-/v2/orders

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit' or 'STOP_LIMIT' or 'POST_ONLY'
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 fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoa custom client order id
params.triggerPricefloatNothe price at which a stop order is triggered at
params.timeInForcestringNothe time in force for the order, either 'GTC' (Good Till Cancelled) or 'IOC' (Immediate or Cancel), default is 'GTC'
params.allowBorrowboolNoif true, the order will be allowed to borrow assets to fulfill the order (default is false)
params.postOnlyboolNoif true, the order will only be posted to the order book and not executed immediately (default is false)
params.traidingAccountIdstringYesthe trading account id (mandatory parameter)
bullish.createOrder (symbol, type, side, amount, price?, params?)

editOrder

edit a trade limit order

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#post-/v2/command-amend

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNounified symbol of the market to create an order in
typestringNo'limit' or 'POST_ONLY'
sidestringNonot used by bullish editOrder
amountfloatNohow much of the currency you want to trade in units of the base currency
pricefloatNothe price for the order, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.traidingAccountIdstringNothe trading account id (mandatory parameter)
params.postOnlyboolNoif true, the order will only be posted to the order book and not executed immediately (default is false)
params.clientOrderIdstringNoa unique identifier for the order, automatically generated if not sent
bullish.editOrder (id, symbol?, type?, side?, amount?, price?, params?)

cancelOrder

cancels an open order

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#post-/v2/command-cancellations

ParamTypeRequiredDescription
idstringNoorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.commandTypestringYesthe command type, default is 'V3CancelOrder' (mandatory parameter)
params.traidingAccountIdstringNothe trading account id (mandatory parameter)
bullish.cancelOrder (id?, symbol, params?)

cancelAllOrders

cancel all open orders in a market

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#post-/v2/command-cancellations

ParamTypeRequiredDescription
symbolstringNoalpaca cancelAllOrders cannot setting symbol, it will cancel all open orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.traidingAccountIdstringYesthe trading account id (mandatory parameter)
bullish.cancelAllOrders (symbol?, params?)

fetchDepositsWithdrawals

fetch history of deposits and withdrawals

Kind: instance method of bullish
Returns: object - a list of transaction structure

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/wallets/transactions

ParamTypeRequiredDescription
codestringNounified currency code for the currency of the deposit/withdrawals, default is undefined
sinceintNotimestamp in ms of the earliest deposit/withdrawal, default is undefined
limitintNomax number of deposit/withdrawals to return, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
bullish.fetchDepositsWithdrawals (code?, since?, limit?, params?)

withdraw

make a withdrawal

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#post-/v1/wallets/withdrawal

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to withdraw
addressstringYesthe address to withdraw to
tagstringNo
paramsobjectNoextra parameters specific to the exchange API endpoint
params.timestampstringYesthe timestamp of the withdrawal request (mandatory)
params.noncestringYesthe nonce of the withdrawal request (mandatory)
params.networkstringYesnetwork for withdraw (mandatory)
bullish.withdraw (code, amount, address, tag?, params?)

fetchAccounts

fetch all the accounts associated with a profile

Kind: instance method of bullish
Returns: object - a dictionary of account structures indexed by the account type

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#tag--trading-accounts

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bullish.fetchAccounts (params?)

fetchDepositAddress

fetch the deposit address for a currency associated with this account

Kind: instance method of bullish
Returns: object - an address structure

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/wallets/deposit-instructions/crypto/-symbol-

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
params.networkstringNonetwork for deposit address
bullish.fetchDepositAddress (code, params?)

fetchBalance

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

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.tradingAccountIdstringYesthe trading account id (mandatory parameter)
params.codestringNounified currency code, default is undefined
bullish.fetchBalance (params?)

fetchPositions

fetch all open positions

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/derivatives-positions

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.tradingAccountIdstringYesthe trading account id
bullish.fetchPositions (symbols, params?)

fetchTransfers

fetch a history of internal transfers made on an account

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/history/transfer

ParamTypeRequiredDescription
codestringYesunified currency code of the currency transferred
sinceintNothe earliest time in ms to fetch transfers for
limitintNothe maximum number of transfer structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintYesthe latest time in ms to fetch transfers for (default time now)
params.tradingAccountIdstringYesthe trading account id
bullish.fetchTransfers (code, since?, limit?, params?)

transfer

transfer currency internally between wallets on the same account

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#post-/v1/command-commandType-V1TransferAsset

ParamTypeRequiredDescription
codestringYesunified currency codeåå
amountfloatYesamount to transfer
fromAccountstringYesaccount ID to transfer from
toAccountstringYesaccount ID to transfer to
paramsobjectNoextra parameters specific to the exchange API endpoint
bullish.transfer (code, amount, fromAccount, toAccount, params?)

fetchBorrowRateHistory

retrieves a history of a currencies borrow interest rate at specific time slots

Kind: instance method of bullish
Returns: Array<object> - an array of borrow rate structures

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/history/borrow-interest

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNotimestamp for the earliest borrow rate
limitintNothe maximum number of borrow rate structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintYesthe latest time in ms to fetch entries for
params.tradingAccountIdstringYesthe trading account id
bullish.fetchBorrowRateHistory (code, since?, limit?, params?)

fetchOpenInterest

fetches the open interest of a specific market

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/markets/-symbol-/tick

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the open interest for
paramsobjectNoextra parameters specific to the exchange API endpoint
bullish.fetchOpenInterest (symbol, params?)

signIn

sign in, must be called prior to using other authenticated methods

Kind: instance method of bullish
Returns: response from exchange

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--add-authenticated-request-header

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
bullish.signIn (params?)

watchTrades

get the list of most recent trades for a particular symbol

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--unified-anonymous-trades-websocket-unauthenticated

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
bullish.watchTrades (symbol, since?, limit?, 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 bullish
Returns: object - a ticker structure

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--anonymous-market-data-price-tick-unauthenticated

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

watchOrderBook

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

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--multi-orderbook-websocket-unauthenticated

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
bullish.watchOrderBook (symbol, limit?, params?)

watchOrders

watches information on multiple orders made by the user

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--private-data-websocket-authenticated

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.tradingAccountIdstringNothe trading account id to fetch entries for
bullish.watchOrders (symbol, since?, limit?, params?)

watchMyTrades

watches information on multiple trades made by the user

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--private-data-websocket-authenticated

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
params.tradingAccountIdstringNothe trading account id to fetch entries for
bullish.watchMyTrades (symbol, since?, limit?, params?)

watchBalance

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

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--private-data-websocket-authenticated

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.tradingAccountIdstringNothe trading account id to fetch entries for
bullish.watchBalance (params?)

watchPositions

watch all open positions

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

See: https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--private-data-websocket-authenticated

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
sinceintNothe earliest time in ms to fetch positions for
limitintNothe maximum number of positions to retrieve
paramsobjectYesextra parameters specific to the exchange API endpoint
bullish.watchPositions (symbols?, since?, limit?, params)

On this page