Ameritrade (Ameritrade v1.1.1) View Source
Documentation for Ameritrade
.
Link to this section Summary
Functions
Cancel a specific order for a specific account. Order throttle limits may apply.
Cancel a specific order for a specific account. Order throttle limits may apply.
Save an order for a specific account.
Save an order for a specific account.
Create watchlist for specific account.This method does not verify that the symbol or asset type are valid.
Create watchlist for specific account.This method does not verify that the symbol or asset type are valid.
Delete a specific saved order for a specific account.
Delete a specific saved order for a specific account.
Delete watchlist for a specific account.
Delete watchlist for a specific account.
Account balances, positions, and orders for a specific account.
Account balances, positions, and orders for a specific account.
Account balances, positions, and orders for all linked accounts.
Account balances, positions, and orders for all linked accounts.
Get an instrument by CUSIP
Get an instrument by CUSIP
Top 10 (up or down) movers by value or percent for a particular market
Top 10 (up or down) movers by value or percent for a particular market
All watchlists for all of the user's linked accounts.
All watchlists for all of the user's linked accounts.
Get option chain for an optionable Symbol
Get option chain for an optionable Symbol
Get a specific order for a specific account.
Get a specific order for a specific account.
Orders for a specific account.
Orders for a specific account.
All orders for a specific account or, if account ID isn't specified, orders will be returned for all linked accounts.
All orders for a specific account or, if account ID isn't specified, orders will be returned for all linked accounts.
Get price history for a symbol
Get price history for a symbol
Get quote for a symbol
Get quote for a symbol
Get quote for one or more symbols
Get quote for one or more symbols
Specific saved order by its ID, for a specific account.
Specific saved order by its ID, for a specific account.
Saved orders for a specific account.
Saved orders for a specific account.
Search or retrieve instrument data, including fundamental data.
Search or retrieve instrument data, including fundamental data.
Preferences for a specific account.
Preferences for a specific account.
Transaction for a specific account.
Transaction for a specific account.
Transactions for a specific account.
Transactions for a specific account.
Preferences for a specific account.
Preferences for a specific account.
User Principal details.
Specific watchlist for a specific account.
Specific watchlist for a specific account.
Place an order for a specific account. Order throttle limits may apply.
Place an order for a specific account. Order throttle limits may apply.
Replace an existing order for an account. The existing order will be replaced by the new order. Once replaced, the old order will be canceled and a new order will be created. Order throttle limits may apply.
Replace an existing order for an account. The existing order will be replaced by the new order. Once replaced, the old order will be canceled and a new order will be created. Order throttle limits may apply.
Replace an existing saved order for an account. The existing saved order will be replaced by the new order.
Replace an existing saved order for an account. The existing saved order will be replaced by the new order.
Replace watchlist for a specific account. This method does not verify that the symbol or asset type are valid.
Replace watchlist for a specific account. This method does not verify that the symbol or asset type are valid.
Update preferences for a specific account.
Update preferences for a specific account.
Partially update watchlist for a specific account: change watchlist name, add to the beginning/end of a watchlist, update or delete items in a watchlist. This method does not verify that the symbol or asset type are valid.
Partially update watchlist for a specific account: change watchlist name, add to the beginning/end of a watchlist, update or delete items in a watchlist. This method does not verify that the symbol or asset type are valid.
Link to this section Functions
Cancel a specific order for a specific account. Order throttle limits may apply.
Example
iex> Ameritrade.cancel_order(token, account_id, order_id)
Cancel a specific order for a specific account. Order throttle limits may apply.
Example
iex> Ameritrade.cancel_order!(token, account_id, order_id)
Save an order for a specific account.
Example
iex> Ameritrade.create_saved_order(token, account_id, order)
Save an order for a specific account.
Example
iex> Ameritrade.create_saved_order!(token, account_id, order)
Create watchlist for specific account.This method does not verify that the symbol or asset type are valid.
Example
iex> Ameritrade.create_watchlist(token, accountId, data)
Create watchlist for specific account.This method does not verify that the symbol or asset type are valid.
Example
iex> Ameritrade.create_watchlist!(token, accountId, data)
Delete a specific saved order for a specific account.
Example
iex> Ameritrade.delete_saved_order(token, account_id, order_id)
Delete a specific saved order for a specific account.
Example
iex> Ameritrade.delete_saved_order!(token, account_id, order_id)
Delete watchlist for a specific account.
Example
iex> Ameritrade.delete_watchlist(token, accountId, watchlistId)
Delete watchlist for a specific account.
iex> Ameritrade.delete_watchlist!(token, accountId, watchlistId)
Account balances, positions, and orders for a specific account.
Example
iex> Ameritrade.get_account(token, id, fields)
Account balances, positions, and orders for a specific account.
Example
iex> Ameritrade.get_account!(token, id, fields)
Account balances, positions, and orders for all linked accounts.
Example
iex> Ameritrade.get_accounts(token, id, fields)
Account balances, positions, and orders for all linked accounts.
Example
iex> Ameritrade.get_accounts!(token, id, fields)
Get an instrument by CUSIP
Example
iex> Ameritrade.get_instrument(token, cusip)
Get an instrument by CUSIP
iex> Ameritrade.get_instrument!(token, cusip)
Top 10 (up or down) movers by value or percent for a particular market
Example
iex> Ameritrade.get_movers(token, index, direction, change)
Top 10 (up or down) movers by value or percent for a particular market
Example
iex> Ameritrade.get_movers!(token, index, direction, change)
All watchlists for all of the user's linked accounts.
Example
iex> Ameritrade.get_multiple_watchlist(token, accountId, watchlistId)
All watchlists for all of the user's linked accounts.
Example
iex> Ameritrade.get_multiple_watchlist!(token, accountId, watchlistId)
get_option_chain(token, symbol, contractType \\ "ALL", strikeCount \\ 0, includeQuotes \\ "FALSE", strategy \\ "SINGLE", interval \\ 0, strike \\ 0, range \\ "ALL", fromDate \\ nil, toDate \\ nil, volatility \\ nil, underlyingPrice \\ nil, interestRate \\ nil, daysToExpiration \\ nil, expMonth \\ "ALL", optionType \\ "ALL")
View SourceGet option chain for an optionable Symbol
Example
iex> Ameritrade.get_option_chain(token,symbol,contractType,strikeCount,includeQuotes,strategy,interval,strike,range,fromDate,toDate,volatility,underlyingPrice,interestRate,daysToExpiration,expMonth,optionType)
get_option_chain!(token, symbol, contractType \\ "ALL", strikeCount \\ 0, includeQuotes \\ "FALSE", strategy \\ "SINGLE", interval \\ 0, strike \\ 0, range \\ "ALL", fromDate \\ nil, toDate \\ nil, volatility \\ nil, underlyingPrice \\ nil, interestRate \\ nil, daysToExpiration \\ nil, expMonth \\ "ALL", optionType \\ "ALL")
View SourceGet option chain for an optionable Symbol
Example
iex> Ameritrade.get_option_chain!(token,symbol,contractType,strikeCount,includeQuotes,strategy,interval,strike,range,fromDate,toDate,volatility,underlyingPrice,interestRate,daysToExpiration,expMonth,optionType)
Get a specific order for a specific account.
Example
iex> Ameritrade.get_order(token, account_id, order_id)
Get a specific order for a specific account.
Example
iex> Ameritrade.get_order!(token, account_id, order_id)
Orders for a specific account.
Example
iex> Ameritrade.get_orders_by_path(token, account_id, order_id)
Orders for a specific account.
Example
iex> Ameritrade.get_orders_by_path!(token, account_id, order_id)
All orders for a specific account or, if account ID isn't specified, orders will be returned for all linked accounts.
Example
iex> Ameritrade.get_orders_by_query(token, map)
All orders for a specific account or, if account ID isn't specified, orders will be returned for all linked accounts.
Example
iex> Ameritrade.get_orders_by_query!(token, map)
get_price_history(token, symbol, periodType \\ "ALL", period \\ nil, frequencyType \\ "minute", frequency \\ "minute", endDate \\ nil, startDate \\ nil, needExtendedHoursData \\ "TRUE")
View SourceGet price history for a symbol
Example
iex> Ameritrade.get_price_history(token,symbol, periodType,period,frequencyType,frequencyendDate,startDate,needExtendedHoursData)
get_price_history!(token, symbol, periodType \\ "ALL", period \\ nil, frequencyType \\ "minute", frequency \\ "minute", endDate \\ nil, startDate \\ nil, needExtendedHoursData \\ "TRUE")
View SourceGet price history for a symbol
Example
iex> Ameritrade.get_price_history!(token,symbol, periodType,period,frequencyType,frequencyendDate,startDate,needExtendedHoursData)
Get quote for a symbol
Example
iex> Ameritrade.get_quote(token, symbol)
Get quote for a symbol
Example
iex> Ameritrade.get_quote!(token, symbol)
Get quote for one or more symbols
Example
iex> Ameritrade.get_quotes(token)
Get quote for one or more symbols
Example
iex> Ameritrade.get_quotes!(token)
Specific saved order by its ID, for a specific account.
Example
iex> Ameritrade.get_saved_order(token, account_id, order_id)
Specific saved order by its ID, for a specific account.
Example
iex> Ameritrade.get_saved_order!(token, account_id, order_id)
Saved orders for a specific account.
Example
iex> Ameritrade.get_saved_orders_by_path(token, account_id)
Saved orders for a specific account.
Example
iex> Ameritrade.get_saved_orders_by_path!(token, account_id)
Search or retrieve instrument data, including fundamental data.
Example
iex> Ameritrade.get_search_instruments(token, symbol, projection)
Search or retrieve instrument data, including fundamental data.
Example
iex> Ameritrade.get_search_instruments!(token, symbol, projection)
Preferences for a specific account.
Example
iex> Ameritrade.get_streamer_subscription_keys(token, account_ids)
Preferences for a specific account.
Example
iex> Ameritrade.get_streamer_subscription_keys!(token, account_ids)
Transaction for a specific account.
Example
iex> Ameritrade.get_transaction(token, accountId, transactionId)
Transaction for a specific account.
Example
iex> Ameritrade.get_transaction!(token, accountId, transactionId)
Transactions for a specific account.
Example
iex> Ameritrade.get_transactions(token, accountId, symbol, startDate, endDate)
Transactions for a specific account.
Example
iex> Ameritrade.get_transactions(token, accountId, symbol, startDate, endDate)
Preferences for a specific account.
Example
iex> Ameritrade.get_user_preferences(token, account_id)
Preferences for a specific account.
Example
iex> Ameritrade.get_user_preferences!(token, account_id)
User Principal details.
Example
iex> Ameritrade.get_user_principals(token)
Specific watchlist for a specific account.
Example
iex> Ameritrade.get_watchlists(token, accountId)
Specific watchlist for a specific account.
Example
iex> Ameritrade.get_watchlists!(token, accountId)
Place an order for a specific account. Order throttle limits may apply.
Example
iex> Ameritrade.place_order(token, account_id, order)
Place an order for a specific account. Order throttle limits may apply.
Example
iex> Ameritrade.place_order!(token, account_id, order)
Replace an existing order for an account. The existing order will be replaced by the new order. Once replaced, the old order will be canceled and a new order will be created. Order throttle limits may apply.
Example
iex> Ameritrade.replace_order(token, account_id, order_id, new_order_data)
Replace an existing order for an account. The existing order will be replaced by the new order. Once replaced, the old order will be canceled and a new order will be created. Order throttle limits may apply.
Example
iex> Ameritrade.replace_order!(token, account_id, order_id, new_order_data)
Replace an existing saved order for an account. The existing saved order will be replaced by the new order.
Example
iex> Ameritrade.replace_saved_order(token, account_id, saved_order_id, values)
Replace an existing saved order for an account. The existing saved order will be replaced by the new order.
Example
iex> Ameritrade.replace_saved_order!(token, account_id, saved_order_id, values)
Replace watchlist for a specific account. This method does not verify that the symbol or asset type are valid.
Example
iex> Ameritrade.replace_watchlist(token, accountId, watchlistId, value)
Replace watchlist for a specific account. This method does not verify that the symbol or asset type are valid.
Example
iex> Ameritrade.replace_watchlist!(token, accountId, watchlistId, value)
Update preferences for a specific account.
Please note that the directOptionsRouting and directEquityRouting values cannot be modified via this operation.
Example
iex> Ameritrade.update_preferences(token, account_id, values)
Update preferences for a specific account.
Please note that the directOptionsRouting and directEquityRouting values cannot be modified via this operation.
Example
iex> Ameritrade.update_preferences!(token, account_id, values)
Partially update watchlist for a specific account: change watchlist name, add to the beginning/end of a watchlist, update or delete items in a watchlist. This method does not verify that the symbol or asset type are valid.
Example
iex> Ameritrade.update_watchlist(token, accountId, watchlistId, value)
Partially update watchlist for a specific account: change watchlist name, add to the beginning/end of a watchlist, update or delete items in a watchlist. This method does not verify that the symbol or asset type are valid.
Example
iex> Ameritrade.update_watchlist!(token, accountId, watchlistId, value)