RESTv1

RESTv1

Communicates with v1 of the Bitfinex HTTP API

Constructor

new RESTv1(opts)

Source:

Instantiate a new REST v1 transport.

Parameters:
Name Type Description
opts Object
Properties
Name Type Attributes Description
apiKey string <nullable>
apiSecret string <nullable>
url string <nullable>

endpoint URL

agent Object <nullable>

optional node agent for connection (proxy)

nonceGenerator Method <nullable>

optional, should return a nonce

Methods

account_infos(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

active_credits(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

active_offers(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

active_orders(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

active_positions(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

balance_history(currency, options, cb)

Source:
See:
Parameters:
Name Type Description
currency string
options Object
cb Method

cancel_all_orders(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

cancel_multiple_orders(order_ids, cb)

Source:
See:
Parameters:
Name Type Description
order_ids Array.<number>
cb Method

cancel_offer(offer_id, cb)

Source:
See:
Parameters:
Name Type Description
offer_id string
cb Method

cancel_order(order_id, cb)

Source:
See:
Parameters:
Name Type Description
order_id number
cb Method

claim_position(position_id, amount, cb)

Source:
See:
Parameters:
Name Type Description
position_id string
amount number
cb Method

close_swap(swap_id, cb)

Source:
Parameters:
Name Type Description
swap_id string
cb Method

fundingbook(currency, options, cb)

Source:
See:
Parameters:
Name Type Description
currency string
options Object
cb Method

get_symbols(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

lends(symbol, cb)

Source:
See:
Parameters:
Name Type Description
symbol string
cb Method

margin_infos(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

movements(currency, options, cb)

Source:
See:
Parameters:
Name Type Description
currency string
options Object
cb Method

multiple_new_orders(orders, cb)

Source:
See:
Parameters:
Name Type Description
orders Array.<Object>
cb Method

new_deposit(currency, method, wallet_name, cb)

Source:
See:
Parameters:
Name Type Description
currency string
method string
wallet_name string
cb Method

new_offer(currency, amount, rate, period, direction, cb)

Source:
See:
Parameters:
Name Type Description
currency string
amount number
rate number
period number
direction string
cb Method

new_order(symbol, amount, price, exchange, side, type, is_hidden, postOnly, cb)

Source:
See:
Parameters:
Name Type Description
symbol string
amount number
price number
exchange string
side string
type string
is_hidden boolean
postOnly boolean
cb Method

offer_status(offer_id, cb)

Source:
See:
Parameters:
Name Type Description
offer_id string
cb Method

order_status(order_id, cb)

Source:
See:
Parameters:
Name Type Description
order_id string
cb Method

orderbook(symbol, options, cb)

Source:
See:
Parameters:
Name Type Description
symbol string
options Object
cb Method

orders_history(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

past_trades(symbol, options, cb)

Source:
See:
Parameters:
Name Type Description
symbol string
options Object
cb Method

replace_order(order_id, symbol, amount, price, exchange, side, type, cb)

Source:
See:
Parameters:
Name Type Description
order_id number
symbol string
amount number
price number
exchange string
side string
type string
cb Method

stats(symbol, cb)

Source:
See:
Parameters:
Name Type Description
symbol string
cb Method

symbols_details(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

taken_swaps(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

ticker(symbol, cb)

Source:
See:
Parameters:
Name Type Default Description
symbol string BTCUSD
cb Method

today(symbol, cb)

Source:
Parameters:
Name Type Description
symbol string
cb Method

total_taken_swaps(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

trades(symbol, cb)

Source:
See:
Parameters:
Name Type Description
symbol string
cb Method

transfer(amount, currency, walletFrom, walletTo)

Source:

POST /v1/transfer

Parameters:
Name Type Description
amount number

amount to transfer

currency string

currency of funds to transfer

walletFrom string

wallet to transfer from

walletTo string

wallet to transfer to

wallet_balances(cb)

Source:
See:
Parameters:
Name Type Description
cb Method

withdraw(withdrawType, walletSelected, amount, address)

Source:

POST /v1/withdraw

Parameters:
Name Type Description
withdrawType string

"bitcoin", "litecoin", "darkcoin" or "mastercoin"

walletSelected string

origin of the wallet to withdraw from, can be "trading", "exchange", or "deposit"

amount number

amount to withdraw

address string

destination address for withdrawal