Easy Equities and Satrix Python Client
[!WARNING]
Not actively maintained anymore.
Unofficial Python client for Easy Equities and Satrix. Intended for personal use.
Supports Python 3.13+.
Installation
pip install easy-equities-client
Features
Accounts:
- Get accounts for a user:
client.accounts.list() - Get account holdings:
client.accounts.holdings(account.id) - Get account valuations:
client.accounts.valuations(account.id) - Get account transactions:
client.accounts.transactions(account.id)
Instruments:
- Get the historical prices for an instrument:
client.instruments.historical_prices('EQU.ZA.SYGJP', Period.ONE_MONTH)
Usage
from easy_equities_client.clients import EasyEquitiesClient # or SatrixClient
client = EasyEquitiesClient()
client.login(username='your username', password='your password')
# List accounts
accounts = client.accounts.list()
"""
[
Account(id='12345', name='EasyEquities ZAR', trading_currency_id='2'),
Account(id='12346', name='TFSA', trading_currency_id='3'),
...
]
"""
# Get account holdings
holdings = client.accounts.holdings(accounts[0].id)
"""
[
{
"name": "CoreShares Global DivTrax ETF",
"contract_code": "EQU.ZA.GLODIV",
"purchase_value": "R2 000.00",
"current_value": "R3 000.00",
"current_price": "R15.50",
"img": "https://resources.easyequities.co.za/logos/EQU.ZA.GLODIV.png",
"view_url": "/AccountOverview/GetInstrumentDetailAction/?IsinCode=ZAE000254249",
"isin": "ZAE000254249"
},
...
]
"""
# Optionally include number of shares for each holding (creates another API call for each holding)
holdings = client.accounts.holdings(accounts[0].id, include_shares=True)
"""
[
{
"name": "CoreShares Global DivTrax ETF",
"contract_code": "EQU.ZA.GLODIV",
"purchase_value": "R2 000.00",
"current_value": "R3 000.00",
"current_price": "R15.50",
"img": "https://resources.easyequities.co.za/logos/EQU.ZA.GLODIV.png",
"view_url": "/AccountOverview/GetInstrumentDetailAction/?IsinCode=ZAE000254249",
"isin": "ZAE000254249",
"shares": "200.123"
},
...
]
"""
# Get account valuations
valuations = client.accounts.valuations(accounts[0].id)
"""
{
"TopSummary": {
"AccountValue": 300000.50,
"AccountCurrency": "ZAR",
"AccountNumber": "EE123456-111111",
"AccountName": "EasyEquities ZAR",
"PeriodMovements": [
{
"ValueMoveLabel": "Profit & Loss Value",
"ValueMove": "R5 000.00",
"PercentageMoveLabel": "Profit & Loss",
"PercentageMove": "15.00%",
"PeriodMoveHeader": "Movement on Current Holdings:"
}
]
},
"NetInterestOnCashItems": [
{
"Label": "Total Interest on Free Cash",
"Value": "R10.55"
},
...
],
"AccrualSummaryItems": [
{
"Label": "Net Accrual",
"Value": "R2.00"
},
...
],
...
}
"""
# Get account transactions
transactions = client.accounts.transactions(accounts[0].id)
"""
[
{
"TransactionId": 0,
"DebitCredit": 200.00,
"Comment": "Account Balance Carried Forward",
"TransactionDate": "2020-07-21T01:00:00",
"LogId": 123456789,
"ActionId": 0,
"Action": "Account Balance Carried Forward",
"ContractCode": ""
},
{
"TransactionId": 0,
"DebitCredit": 50.00,
"Comment": "CoreShares Global DivTrax ETF-Foreign Dividends @15.00",
"TransactionDate": "2020-11-19T14:30:00",
"LogId": 123456790,
"ActionId": 122,
"Action": "Foreign Dividend",
"ContractCode": "EQU.ZA.GLODIV"
},
...
]
"""
# Get historical data for an equity/instrument
from easy_equities_client.instruments.types import Period
historical_prices = client.instruments.historical_prices('EQU.ZA.SYGJP', Period.ONE_MONTH)
"""
{
"chartData": {
"Dataset": [
41.97,
42.37,
...
],
"Labels": [
"25 Jun 21",
"28 Jun 21",
...
],
"TradingCurrencySymbol": "R",
...
}
}
"""
Example Use Cases
Show holdings total profits/losses
Run a script to show your holdings and their total profits/losses, e.g.
show_holdings_profit_loss.py.
Contributing
See Contributing
Metadata
Release files for easy-equities-client 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| easy_equities_client-1.2.0.tar.gz | 8.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| easy_equities_client-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.3 kB
Release files / easy_equities_client-1.2.0.tar.gz
| Download URL | easy_equities_client-1.2.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5a66fefccd617c2a602a261bbde8bacedaf0e5b0cf28f2adb748e54257b7e8c
|
|
BLAKE2b-256 checksum How to use checksums |
34f315c6a7266b8429425488bc18fad58dfd0b2a40ab8f0fb62363fb03d2cdf6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.13
|
Release files / easy_equities_client-1.2.0-py3-none-any.whl
| Download URL | easy_equities_client-1.2.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2564f2fec084e8ce3ef8e181d10e7f3c8172d99e993a2433a9c736ac5c603cb4
|
|
BLAKE2b-256 checksum How to use checksums |
41f78072739f52649b0242b1e0e07f9efaada33c87cbf50cdfac0d3011c2c6d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.13
|
Security for easy-equities-client 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.