public method O2GTradingSettingsProvider.getBaseUnitSize

Brief

Gets the size of one lot.

Declaration
Java
int  getBaseUnitSize (String instrument, O2GAccountRow accountRow)

Parameters
instrument

The symbol of an instrument. For example, EUR/USD, USD/JPY, GBP/USD.

accountRow

The instance of the O2GAccountRow class that contains account information.

Details

In the case of FX instruments, the returned value is expressed in the base currency of the instrument.
In the case of CFD instruments, the returned value is expressed in contracts.

You can trade only a number of lots multiple of the returned value. For example, if the returned value for a particular account for the EUR/USD instrument is 10000, you can place an order for 10000, 20000, 30000 EUR/USD, etc. If you place an order with the amount that is not multiple of 10000 (for example, 15000 EUR/USD), your order is rejected.

Note: The minimum and maximum sizes of an order can be obtained by calling the O2GTradingSettingsProvider.getMinQuantity and O2GTradingSettingsProvider.getMaxQuantity methods.

Declared in O2GTradingSettingsProvider

back