Generic Broker: buyMarket()

ICE Data Services -

buyMarket()
Previous  Top  Next


buyMarket( symbol, quantity [, route] [, expiry] )

Submit a market order to broker.

Parameters

symbol
the symbol for which to initiate the trade
quantity
the number of shares/contracts
route
optional. the route or exchange for the trade (broker specific)
expiry
optional. expiration for the order:

SB_DAY
SB_GTC
SB_IOC


Usage

buyMarket( "IDC"100 );
buyMarket( getSymbol(), 
200 );

 

Interactive Broker Examples

 

buyMarket(getSymbol(), 100);  // Equities

buyMarket(getSymbol(), 1, "GLOBEX", "200506");  // Futures