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 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 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.

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

Link to this function

cancel_order(token, account_id, order_id)

View Source

Cancel a specific order for a specific account. Order throttle limits may apply.

Example

  iex>  Ameritrade.cancel_order(token, account_id, order_id)
Link to this function

cancel_order!(token, account_id, order_id)

View Source

Cancel a specific order for a specific account. Order throttle limits may apply.

Example

  iex>  Ameritrade.cancel_order!(token, account_id, order_id)
Link to this function

create_saved_order(token, account_id, order)

View Source

Save an order for a specific account.

Example

  iex>  Ameritrade.create_saved_order(token, account_id, order)
Link to this function

create_saved_order!(token, account_id, order)

View Source

Save an order for a specific account.

Example

  iex>  Ameritrade.create_saved_order!(token, account_id, order)
Link to this function

create_watchlist(token, accountId, data)

View Source

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)
Link to this function

create_watchlist!(token, accountId, data)

View Source

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)
Link to this function

delete_saved_order(token, account_id, order_id)

View Source

Delete a specific saved order for a specific account.

Example

  iex>  Ameritrade.delete_saved_order(token, account_id, order_id)
Link to this function

delete_saved_order!(token, account_id, order_id)

View Source

Delete a specific saved order for a specific account.

Example

  iex>  Ameritrade.delete_saved_order!(token, account_id, order_id)
Link to this function

delete_watchlist(token, accountId, watchlistId)

View Source

Delete watchlist for a specific account.

Example

  iex>  Ameritrade.delete_watchlist(token, accountId, watchlistId)
Link to this function

delete_watchlist!(token, accountId, watchlistId)

View Source

Delete watchlist for a specific account.

  iex>  Ameritrade.delete_watchlist!(token, accountId, watchlistId)
Link to this function

get_account(token, id, fields \\ [])

View Source

Account balances, positions, and orders for a specific account.

Example

  iex>  Ameritrade.get_account(token, id, fields)
Link to this function

get_account!(token, id, fields \\ [])

View Source

Account balances, positions, and orders for a specific account.

Example

  iex>  Ameritrade.get_account!(token, id, fields)
Link to this function

get_accounts(token, id, fields \\ [])

View Source

Account balances, positions, and orders for all linked accounts.

Example

  iex>  Ameritrade.get_accounts(token, id, fields)
Link to this function

get_accounts!(token, id, fields \\ [])

View Source

Account balances, positions, and orders for all linked accounts.

Example

  iex>  Ameritrade.get_accounts!(token, id, fields)
Link to this function

get_instrument(token, cusip)

View Source

Get an instrument by CUSIP

Example

  iex>  Ameritrade.get_instrument(token, cusip)
Link to this function

get_instrument!(token, cusip)

View Source

Get an instrument by CUSIP

  iex>  Ameritrade.get_instrument!(token, cusip)
Link to this function

get_movers(token, index, direction \\ "up", change \\ "value")

View Source

Top 10 (up or down) movers by value or percent for a particular market

Example

  iex>  Ameritrade.get_movers(token, index, direction, change)
Link to this function

get_movers!(token, index, direction \\ "up", change \\ "value")

View Source

Top 10 (up or down) movers by value or percent for a particular market

Example

  iex>  Ameritrade.get_movers!(token, index, direction, change)
Link to this function

get_multiple_watchlist(token, accountId, watchlistId)

View Source

All watchlists for all of the user's linked accounts.

Example

  iex>  Ameritrade.get_multiple_watchlist(token, accountId, watchlistId)
Link to this function

get_multiple_watchlist!(token, accountId, watchlistId)

View Source

All watchlists for all of the user's linked accounts.

Example

  iex>  Ameritrade.get_multiple_watchlist!(token, accountId, watchlistId)
Link to this function

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 Source

Get 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)
Link to this function

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 Source

Get 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)
Link to this function

get_order(token, account_id, order_id)

View Source

Get a specific order for a specific account.

Example

  iex>  Ameritrade.get_order(token, account_id, order_id)
Link to this function

get_order!(token, account_id, order_id)

View Source

Get a specific order for a specific account.

Example

  iex>  Ameritrade.get_order!(token, account_id, order_id)
Link to this function

get_orders_by_path(token, account_id, order_id)

View Source

Orders for a specific account.

Example

  iex>  Ameritrade.get_orders_by_path(token, account_id, order_id)
Link to this function

get_orders_by_path!(token, account_id, order_id)

View Source

Orders for a specific account.

Example

  iex>  Ameritrade.get_orders_by_path!(token, account_id, order_id)
Link to this function

get_orders_by_query(token, map)

View Source

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)
Link to this function

get_orders_by_query!(token, map)

View Source

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)
Link to this function

get_price_history(token, symbol, periodType \\ "ALL", period \\ nil, frequencyType \\ "minute", frequency \\ "minute", endDate \\ nil, startDate \\ nil, needExtendedHoursData \\ "TRUE")

View Source

Get price history for a symbol

Example

  iex>  Ameritrade.get_price_history(token,symbol, periodType,period,frequencyType,frequencyendDate,startDate,needExtendedHoursData)
Link to this function

get_price_history!(token, symbol, periodType \\ "ALL", period \\ nil, frequencyType \\ "minute", frequency \\ "minute", endDate \\ nil, startDate \\ nil, needExtendedHoursData \\ "TRUE")

View Source

Get price history for a symbol

Example

  iex>  Ameritrade.get_price_history!(token,symbol, periodType,period,frequencyType,frequencyendDate,startDate,needExtendedHoursData)
Link to this function

get_quote(token, symbol \\ "GOOGL")

View Source

Get quote for a symbol

Example

   iex>  Ameritrade.get_quote(token, symbol)
Link to this function

get_quote!(token, symbol \\ "GOOGL")

View Source

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)
Link to this function

get_saved_order(token, account_id, order_id)

View Source

Specific saved order by its ID, for a specific account.

Example

  iex>  Ameritrade.get_saved_order(token, account_id, order_id)
Link to this function

get_saved_order!(token, account_id, order_id)

View Source

Specific saved order by its ID, for a specific account.

Example

  iex>  Ameritrade.get_saved_order!(token, account_id, order_id)
Link to this function

get_saved_orders_by_path(token, account_id)

View Source

Saved orders for a specific account.

Example

  iex>  Ameritrade.get_saved_orders_by_path(token, account_id)
Link to this function

get_saved_orders_by_path!(token, account_id)

View Source

Saved orders for a specific account.

Example

  iex>  Ameritrade.get_saved_orders_by_path!(token, account_id)
Link to this function

get_search_instruments(token, symbol, projection)

View Source

Search or retrieve instrument data, including fundamental data.

Example

  iex>  Ameritrade.get_search_instruments(token, symbol, projection)
Link to this function

get_search_instruments!(token, symbol, projection)

View Source

Search or retrieve instrument data, including fundamental data.

Example

  iex>  Ameritrade.get_search_instruments!(token, symbol, projection)
Link to this function

get_streamer_subscription_keys(token, account_ids)

View Source

Preferences for a specific account.

Example

   iex>  Ameritrade.get_streamer_subscription_keys(token, account_ids)
Link to this function

get_streamer_subscription_keys!(token, account_ids)

View Source

Preferences for a specific account.

Example

   iex>  Ameritrade.get_streamer_subscription_keys!(token, account_ids)
Link to this function

get_transaction(token, accountId, transactionId)

View Source

Transaction for a specific account.

Example

  iex>  Ameritrade.get_transaction(token, accountId, transactionId)
Link to this function

get_transaction!(token, accountId, transactionId)

View Source

Transaction for a specific account.

Example

  iex>  Ameritrade.get_transaction!(token, accountId, transactionId)
Link to this function

get_transactions(token, accountId, symbol, startDate, endDate)

View Source

Transactions for a specific account.

Example

  iex>  Ameritrade.get_transactions(token, accountId, symbol, startDate, endDate)
Link to this function

get_transactions!(token, accountId, symbol, startDate, endDate)

View Source

Transactions for a specific account.

Example

  iex>  Ameritrade.get_transactions(token, accountId, symbol, startDate, endDate)
Link to this function

get_user_preferences(token, account_id)

View Source

Preferences for a specific account.

Example

  iex>  Ameritrade.get_user_preferences(token, account_id)
Link to this function

get_user_preferences!(token, account_id)

View Source

Preferences for a specific account.

Example

  iex>  Ameritrade.get_user_preferences!(token, account_id)
Link to this function

get_user_principals(token)

View Source

User Principal details.

Example

  iex>  Ameritrade.get_user_principals(token)
Link to this function

get_watchlists(token, accountId)

View Source

Specific watchlist for a specific account.

Example

  iex>  Ameritrade.get_watchlists(token, accountId)
Link to this function

get_watchlists!(token, accountId)

View Source

Specific watchlist for a specific account.

Example

  iex>  Ameritrade.get_watchlists!(token, accountId)
Link to this function

place_order(token, account_id, order)

View Source

Place an order for a specific account. Order throttle limits may apply.

Example

  iex>  Ameritrade.place_order(token, account_id, order)
Link to this function

place_order!(token, account_id, order)

View Source

Place an order for a specific account. Order throttle limits may apply.

Example

  iex>  Ameritrade.place_order!(token, account_id, order)
Link to this function

replace_order(token, account_id, order_id, new_order_data)

View Source

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)
Link to this function

replace_order!(token, account_id, order_id, new_order_data)

View Source

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)
Link to this function

replace_saved_order(token, account_id, saved_order_id, values)

View Source

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)
Link to this function

replace_saved_order!(token, account_id, saved_order_id, values)

View Source

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)
Link to this function

replace_watchlist(token, accountId, watchlistId, value)

View Source

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)
Link to this function

replace_watchlist!(token, accountId, watchlistId, value)

View Source

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)
Link to this function

update_preferences(token, account_id, values)

View Source

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)
Link to this function

update_preferences!(token, account_id, values)

View Source

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)
Link to this function

update_watchlist(token, accountId, watchlistId, value)

View Source

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)
Link to this function

update_watchlist!(token, accountId, watchlistId, value)

View Source

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)