ex_poloniex v0.0.4 ExPoloniex.Trading

Module for Poloniex Trading API methods

https://poloniex.com/support/api/

Link to this section Summary

Functions

Places a limit buy order in a given market. Required POST parameters are “currencyPair”, “rate”, and “amount”. If successful, the method will return the order number

Cancels an order you have placed in a given market. Required POST parameter is “orderNumber”

Generates a new deposit address for the currency specified by the “currency” POST parameter

Returns all of your available balances

Returns all of your balances, including available balance, balance on orders, and the estimated BTC value of your balance. By default, this call is limited to your exchange account; set the “account” POST parameter to “all” to include your margin and lending accounts

Returns all of your deposit addresses

Returns your deposit and withdrawal history within a range, specified by the “start” and “end” POST parameters, both of which should be given as UNIX timestamps

If you are enrolled in the maker-taker fee schedule, returns your current trading fees and trailing 30-day volume in BTC. This information is updated once every 24 hours

Returns your open orders for a given market, specified by the “currencyPair” POST parameter, e.g. “BTC_XCP”. Set “currencyPair” to “all” to return open orders for all markets

Returns all trades involving a given order, specified by the “orderNumber” POST parameter. If no trades for the order have occurred or you specify an order that does not belong to you, you will receive an error

Returns the past 200 trades for a given market, or up to 50,000 trades between a range specified in UNIX timestamps by the “start” and “end” GET parameters

Places a sell order in a given market. Parameters and output are the same as for the buy method

Link to this section Functions

Link to this function buy(currency_pair, rate, amount, order_type \\ nil)

Places a limit buy order in a given market. Required POST parameters are “currencyPair”, “rate”, and “amount”. If successful, the method will return the order number.

You may optionally set “fillOrKill”, “immediateOrCancel”, “postOnly” to 1. A fill-or-kill order will either fill in its entirety or be completely aborted. An immediate-or-cancel order can be partially or completely filled, but any portion of the order that cannot be filled immediately will be canceled rather than left on the order book. A post-only order will only be placed if no portion of it fills immediately; this guarantees you will never pay the taker fee on any part of the order that fills.

Link to this function cancel_loan_offer()
Link to this function cancel_order(order_number)

Cancels an order you have placed in a given market. Required POST parameter is “orderNumber”

Link to this function close_margin_position()
Link to this function create_loan_offer()
Link to this function generate_new_address(currency)

Generates a new deposit address for the currency specified by the “currency” POST parameter

Link to this function get_margin_position()
Link to this function return_active_loans()
Link to this function return_available_account_balances()
Link to this function return_balances()

Returns all of your available balances

Link to this function return_complete_balances()

Returns all of your balances, including available balance, balance on orders, and the estimated BTC value of your balance. By default, this call is limited to your exchange account; set the “account” POST parameter to “all” to include your margin and lending accounts

Link to this function return_deposit_addresses()

Returns all of your deposit addresses

Link to this function return_deposits_withdrawals(start, to)

Returns your deposit and withdrawal history within a range, specified by the “start” and “end” POST parameters, both of which should be given as UNIX timestamps

Link to this function return_fee_info()

If you are enrolled in the maker-taker fee schedule, returns your current trading fees and trailing 30-day volume in BTC. This information is updated once every 24 hours

Link to this function return_lending_history()
Link to this function return_margin_account_summary()
Link to this function return_open_loan_offers()
Link to this function return_open_orders(currency_pair)

Returns your open orders for a given market, specified by the “currencyPair” POST parameter, e.g. “BTC_XCP”. Set “currencyPair” to “all” to return open orders for all markets

Link to this function return_order_trades(order_number)

Returns all trades involving a given order, specified by the “orderNumber” POST parameter. If no trades for the order have occurred or you specify an order that does not belong to you, you will receive an error

Link to this function return_tradable_balances()
Link to this function return_trade_history(currency_pair, start, to)

Returns the past 200 trades for a given market, or up to 50,000 trades between a range specified in UNIX timestamps by the “start” and “end” GET parameters.

Link to this function sell(currency_pair, rate, amount, order_type \\ nil)

Places a sell order in a given market. Parameters and output are the same as for the buy method.

Link to this function toggle_auto_renew()
Link to this function transfer_balance()