Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

orderid

Obtain next valid order identification number

Syntax

id = orderid(ib)

Description

example

id = orderid(ib) obtains the next valid order identification number for Interactive Brokers® connection ib.

Examples

collapse all

Create an IB Trader Workstation℠ connection on the local machine using port number 7496.

ib = ibtws('',7496);

Obtain the next valid order identification number using ib.

id = orderid(ib)
id =

     1

id contains the next valid order identification number. To create an order, use this number in createOrder.

Close the IB Trader Workstation℠ connection.

close(ib)

Input Arguments

collapse all

IB Trader WorkstationSM connection, specified as an IB Trader Workstation connection object created using ibtws.

Output Arguments

collapse all

Next valid order identification number, returned as a numeric scalar.

Tips

  • ibBuiltInErrMsg appears in the MATLAB® workspace. Check the status of connection and function execution by displaying the contents of this variable. ibBuiltInErrMsg contains messages related to:

    • Connection

    • Information resulting from executing functions

    • Errors

Introduced in R2015a

Was this topic helpful?