Securities Account
The securities account is the account that holds the securities that the user or company.
SecuritiesAccount
Bases: BaseModel
The SecuritiesAccount model represents a securities account in the trading system.
Attributes:
| Name | Type | Description |
|---|---|---|
clearing_account_id |
str
|
The ID of the clearing account associated with this securities account. |
id |
str
|
The unique ID of the securities account. |
private_account |
bool
|
A flag indicating whether the securities account is private. |
version |
int
|
The version of the securities account. |
client |
Client
|
The client associated with the securities account, used for API interactions. |
Source code in alpha_trader/securities_account/__init__.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
orders: List[Order]
property
Orders for this securities account
Returns: List of orders
portfolio: Portfolio
property
Retrieve the portfolio of this securities account Returns: Portfolio: The portfolio associated with this securities account
order(action, order_type, quantity, security_identifier, price=None, counter_party=None)
Create an order for this securities account
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
str
|
action of the order "BUY" or "SELL" |
required |
order_type
|
str
|
order type "LIMIT" or "MARKET" |
required |
price
|
float
|
price of the order |
None
|
quantity
|
int
|
number of shares |
required |
security_identifier
|
str
|
security identifier of the order |
required |
counter_party
|
str | None
|
security account id of the counterparty |
None
|
Returns:
| Type | Description |
|---|---|
Order
|
Order |
Source code in alpha_trader/securities_account/__init__.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |