Pricing

class async_v20.Price(type: str= sentinel, instrument: InstrumentName= sentinel, time: DateTime= sentinel, status: PriceStatus= sentinel, tradeable: bool= sentinel, bids: ArrayPriceBucket= sentinel, asks: ArrayPriceBucket= sentinel, closeout_bid: PriceValue= sentinel, closeout_ask: PriceValue= sentinel, quote_home_conversion_factors: QuoteHomeConversionFactors= sentinel, units_available: UnitsAvailable= sentinel)[source]

Bases: async_v20.definitions.base.Model

The specification of an Account-specific Price.

type

str The string “PRICE”. Used to identify the a Price object when found in a stream.

instrument

InstrumentName The Price’s Instrument.

time

DateTime The date/time when the Price was created

status

PriceStatus The status of the Price.

tradeable

bool Flag indicating if the Price is tradeable or not

bids

( PriceBucket, …), The list of prices and liquidity available on the Instrument’s bid side. It is possible for this list to be empty if there is no bid liquidity currently available for the Instrument in the Account.

asks

( PriceBucket, …), The list of prices and liquidity available on the Instrument’s ask side. It is possible for this list to be empty if there is no ask liquidity currently available for the Instrument in the Account.

closeout_bid

PriceValue The closeout bid Price. This Price is used when a bid is required to closeout a Position (margin closeout or manual) yet there is no bid liquidity. The closeout bid is never used to open a new position.

closeout_ask

PriceValue The closeout ask Price. This Price is used when a ask is required to closeout a Position (margin closeout or manual) yet there is no ask liquidity. The closeout ask is never used to open a new position.

quote_home_conversion_factors

QuoteHomeConversionFactors The factors used to convert quantities of this price’s Instrument’s quote currency into a quantity of the Account’s home currency.

units_available

UnitsAvailable Representation of how many units of an Instrument are available to be traded by an Order depending on its postionFill option.

class async_v20.PriceBucket(price: PriceValue= sentinel, liquidity: int= sentinel)[source]

Bases: async_v20.definitions.base.Model

A Price Bucket represents a price available for an amount of liquidity

price

PriceValue The Price offered by the PriceBucket

liquidity

int The amount of liquidity offered by the PriceBucket

class async_v20.QuoteHomeConversionFactors(positive_units: DecimalNumber= sentinel, negative_units: DecimalNumber= sentinel)[source]

Bases: async_v20.definitions.base.Model

QuoteHomeConversionFactors represents the factors that can be used used to convert quantities of a Price’s Instrument’s quote currency into the Account’s home currency.

positive_units

DecimalNumber The factor used to convert a positive amount of the Price’s Instrument’s quote currency into a positive amount of the Account’s home currency. Conversion is performed by multiplying the quote units by the conversion factor.

negative_units

DecimalNumber The factor used to convert a negative amount of the Price’s Instrument’s quote currency into a negative amount of the Account’s home currency. Conversion is performed by multiplying the quote units by the conversion factor.

class async_v20.ClientPrice(bids: ArrayPriceBucket= sentinel, asks: ArrayPriceBucket= sentinel, closeout_bid: PriceValue= sentinel, closeout_ask: PriceValue= sentinel, timestamp: DateTime= sentinel)[source]

Bases: async_v20.definitions.base.Model

Client price for an Account.

bids

( PriceBucket, …), The list of prices and liquidity available on the Instrument’s bid side. It is possible for this list to be empty if there is no bid liquidity currently available for the Instrument in the Account.

asks

( PriceBucket, …), The list of prices and liquidity available on the Instrument’s ask side. It is possible for this list to be empty if there is no ask liquidity currently available for the Instrument in the Account.

closeout_bid

PriceValue The closeout bid Price. This Price is used when a bid is required to closeout a Position (margin closeout or manual) yet there is no bid liquidity. The closeout bid is never used to open a new position.

closeout_ask

PriceValue The closeout ask Price. This Price is used when a ask is required to closeout a Position (margin closeout or manual) yet there is no ask liquidity. The closeout ask is never used to open a new position.

timestamp

DateTime The date/time when the Price was created.

class async_v20.PricingHeartbeat(type: str= sentinel, time: DateTime= sentinel)[source]

Bases: async_v20.definitions.base.Model

A PricingHeartbeat object is injected into the Pricing stream to ensure that the HTTP connection remains active.

type

str The string “HEARTBEAT”

time

DateTime The date/time when the Heartbeat was created.