bullish
bullish cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.
bullish
Kind: global class
Extends: Exchange
- fetchTime
- fetchCurrencies
- fetchMarkets
- fetchOrderBook
- fetchTrades
- fetchMyTrades
- fetchOrderTrades
- fetchTicker
- fetchOHLCV
- fetchFundingRateHistory
- fetchOrders
- fetchOpenOrders
- fetchCanceledOrders
- fetchClosedOrders
- fetchCanceledAndClosedOrders
- fetchOrder
- createOrder
- editOrder
- cancelOrder
- cancelAllOrders
- fetchDepositsWithdrawals
- withdraw
- fetchAccounts
- fetchDepositAddress
- fetchBalance
- fetchPositions
- fetchTransfers
- transfer
- fetchBorrowRateHistory
- fetchOpenInterest
- signIn
- watchTrades
- watchTicker
- watchOrderBook
- watchOrders
- watchMyTrades
- watchBalance
- watchPositions
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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the order book for |
| limit | int | No | the maximum amount of order book entries to return (not used by bullish) |
| params | object | No | extra 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
- https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/markets/-symbol-/trades
- https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/history/markets/-symbol-/trades
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch trades for |
| since | int | No | timestamp in ms of the earliest trade to fetch |
| limit | int | No | the maximum amount of trades to fetch (max 100) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp in ms of the latest trade to fetch |
| params.paginate | boolean | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trades structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch trades for |
| params.orderId | string | No | the order id to fetch trades for |
| params.clientOrderId | string | No | the client order id to fetch trades for |
| params.tradingAccountId | string | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | Yes | unified market symbol |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trades to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string | Yes | the length of time each candle represents |
| since | int | No | timestamp in ms of the earliest candle to fetch |
| limit | int | No | the maximum amount of candles to fetch (max 100) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp in ms of the latest entry |
| params.paginate | boolean | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the funding rate history for |
| since | int | No | not sent to exchange api, exchange api always returns the most recent data, only used to filter exchange response |
| limit | int | No | the maximum amount of funding rate structures to fetch |
| params | object | No | extra 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
- https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#tag--orders
- https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#tag--history
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market orders were made in |
| since | int | No | the earliest time in ms to fetch orders for |
| limit | int | No | the maximum number of order structures to retrieve (5, 25, 50, 100, default is 25) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp in ms of the latest order to fetch |
| params.tradingAccountId | string | No | the trading account id (mandatory parameter) |
| params.orderId | string | No | the id of the order to fetch for |
| params.clientOrderId | string | No | the client id of the order to fetch for |
| params.status | string | No | filter by order status, 'OPEN', 'CANCELLED', 'CLOSED', 'REJECTED' |
| params.paginate | bool | No | default 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market orders were made in |
| since | int | No | the earliest time in ms to fetch orders for |
| limit | int | No | the maximum number of order structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.tradingAccountId | string | Yes | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the canceled orders |
| since | int | No | timestamp in ms of the earliest order |
| limit | int | No | the max number of canceled orders to return |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.tradingAccountId | string | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the closed orders |
| since | int | No | timestamp in ms of the earliest order |
| limit | int | No | the max number of closed orders to return |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.tradingAccountId | string | Yes | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the closed orders |
| since | int | No | timestamp in ms of the earliest order |
| limit | int | No | the max number of closed orders to return |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.tradingAccountId | string | No | the 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-
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | the order id |
| symbol | string | No | unified symbol of the market the order was made in |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.traidingAccountId | string | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market' or 'limit' or 'STOP_LIMIT' or 'POST_ONLY' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | how much of currency you want to trade in units of base currency |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string | No | a custom client order id |
| params.triggerPrice | float | No | the price at which a stop order is triggered at |
| params.timeInForce | string | No | the time in force for the order, either 'GTC' (Good Till Cancelled) or 'IOC' (Immediate or Cancel), default is 'GTC' |
| params.allowBorrow | bool | No | if true, the order will be allowed to borrow assets to fulfill the order (default is false) |
| params.postOnly | bool | No | if true, the order will only be posted to the order book and not executed immediately (default is false) |
| params.traidingAccountId | string | Yes | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | No | unified symbol of the market to create an order in |
| type | string | No | 'limit' or 'POST_ONLY' |
| side | string | No | not used by bullish editOrder |
| amount | float | No | how much of the currency you want to trade in units of the base currency |
| price | float | No | the price for the order, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.traidingAccountId | string | No | the trading account id (mandatory parameter) |
| params.postOnly | bool | No | if true, the order will only be posted to the order book and not executed immediately (default is false) |
| params.clientOrderId | string | No | a 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
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | No | order id |
| symbol | string | Yes | unified symbol of the market the order was made in |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.commandType | string | Yes | the command type, default is 'V3CancelOrder' (mandatory parameter) |
| params.traidingAccountId | string | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | alpaca cancelAllOrders cannot setting symbol, it will cancel all open orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.traidingAccountId | string | Yes | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code for the currency of the deposit/withdrawals, default is undefined |
| since | int | No | timestamp in ms of the earliest deposit/withdrawal, default is undefined |
| limit | int | No | max number of deposit/withdrawals to return, default is undefined |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| amount | float | Yes | the amount to withdraw |
| address | string | Yes | the address to withdraw to |
| tag | string | No | |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.timestamp | string | Yes | the timestamp of the withdrawal request (mandatory) |
| params.nonce | string | Yes | the nonce of the withdrawal request (mandatory) |
| params.network | string | Yes | network 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.network | string | No | network 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
- https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/accounts/asset
- https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#get-/v1/accounts/asset/-symbol-
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.tradingAccountId | string | Yes | the trading account id (mandatory parameter) |
| params.code | string | No | unified 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.tradingAccountId | string | Yes | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code of the currency transferred |
| since | int | No | the earliest time in ms to fetch transfers for |
| limit | int | No | the maximum number of transfer structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | Yes | the latest time in ms to fetch transfers for (default time now) |
| params.tradingAccountId | string | Yes | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency codeåå |
| amount | float | Yes | amount to transfer |
| fromAccount | string | Yes | account ID to transfer from |
| toAccount | string | Yes | account ID to transfer to |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| since | int | No | timestamp for the earliest borrow rate |
| limit | int | No | the maximum number of borrow rate structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | Yes | the latest time in ms to fetch entries for |
| params.tradingAccountId | string | Yes | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the open interest for |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch trades for |
| since | int | No | timestamp in ms of the earliest trade to fetch |
| limit | int | No | the maximum amount of trades to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the order book for |
| limit | int | No | the maximum amount of order book entries to return |
| params | object | No | extra parameters specific to the exchange API endpoint |
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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market orders were made in |
| since | int | No | the earliest time in ms to fetch orders for |
| limit | int | No | the maximum number of order structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.tradingAccountId | string | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market trades were made in |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trade structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.tradingAccountId | string | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.tradingAccountId | string | No | the 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols |
| since | int | No | the earliest time in ms to fetch positions for |
| limit | int | No | the maximum number of positions to retrieve |
| params | object | Yes | extra parameters specific to the exchange API endpoint |
bullish.watchPositions (symbols?, since?, limit?, params)