Skip to content

quantpylib.gateway.account

Account

Bases: BaseGateway

account_balance(exc, **kwargs) async

Retrieve balance details of the user, such as equity, margin (total, maintenance) and pnl.

Parameters:

Name Type Description Default
exc str

Alias for the exchange client.

required
**kwargs

Exchange wrapper specific keyword arguments.

{}

Returns:

Type Description
dict

Balance details.

account_fill_subscribe(exc, handler, **kwargs) async

Subscribe to account fill updates.

Schema modes follow the wrapper contract: 0 passes the raw venue payload and 1 emits quantpylib.standards.portfolio.Fill objects.

Parameters:

Name Type Description Default
exc str

Alias for the exchange client.

required
handler coroutine

Callback invoked for each fill update.

required
**kwargs

Exchange wrapper specific keyword arguments.

{}

account_fill_unsubscribe(exc, **kwargs) async

Unsubscribe from account fill updates.

Parameters:

Name Type Description Default
exc str

Alias for the exchange client.

required
**kwargs

Exchange wrapper specific keyword arguments.

{}

account_fills_get(exc, **kwargs) async

Retrieve normalized account fills for a complete time range.

Parameters:

Name Type Description Default
exc str

Alias for the exchange client.

required
**kwargs

Exchange wrapper specific query arguments.

{}

Returns:

Type Description

quantpylib.standards.portfolio.Fills: Authoritative fill history carrying the queried end in valid_until_ns.

account_fills_mirror(exc, **kwargs) async

Keep a live, internal account fill mirror.

Parameters:

Name Type Description Default
exc str

Alias for the exchange client.

required
**kwargs

Exchange wrapper specific keyword arguments.

{}

Returns:

Type Description
Fills | list | None

Mirrored fill state in the wrapper-selected representation.