Getting Started with Upvest Investment API
Introduction
Upvest Investment API.
Install the Package
The package is compatible with Python versions 3.7+.
Install the package from PyPi using the following pip command:
pip install uv-apimatic-sdk==0.0.1
You can also view the package at: https://pypi.python.org/pypi/uv-apimatic-sdk/0.0.1
Initialize the API Client
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
| Parameter | Type | Description |
|---|---|---|
| environment | Environment |
The API environment. Default: Environment.PRODUCTION |
| http_client_instance | Union[Session, HttpClientProvider] |
The Http Client passed from the sdk user for making requests |
| override_http_client_configuration | bool |
The value which determines to override properties of the passed Http Client from the sdk user |
| http_call_back | HttpCallBack |
The callback value that is invoked before and after an HTTP call is made to an endpoint |
| timeout | float |
The value to use for connection timeout. Default: 30 |
| max_retries | int |
The number of times to retry an endpoint call if it fails. Default: 0 |
| backoff_factor | float |
A backoff factor to apply between attempts after the second try. Default: 2 |
| retry_statuses | Array of int |
The http statuses on which retry is to be done. Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524] |
| retry_methods | Array of string |
The http methods on which retry is to be done. Default: ["GET", "PUT", "GET", "PUT"] |
| proxy_settings | ProxySettings |
Optional proxy configuration to route HTTP requests through a proxy server. |
| logging_configuration | LoggingConfiguration |
The SDK logging configuration for API calls |
| client_credentials_auth_credentials | ClientCredentialsAuthCredentials |
The credential object for OAuth 2 Client Credentials Grant |
| http_signature_credentials | HttpSignatureCredentials |
The key material used to sign every request with an HTTP message signature |
The API client can be initialized as follows:
Code-Based Client Initialization
import logging
from upvestinvestmentapi.configuration import Environment
from upvestinvestmentapi.http.auth.oauth_2 import ClientCredentialsAuthCredentials
from upvestinvestmentapi.http.signature import HttpSignatureCredentials
from upvestinvestmentapi.logging.configuration.api_logging_configuration import LoggingConfiguration
from upvestinvestmentapi.logging.configuration.api_logging_configuration import RequestLoggingConfiguration
from upvestinvestmentapi.logging.configuration.api_logging_configuration import ResponseLoggingConfiguration
from upvestinvestmentapi.models.oauth_scope import OauthScope
from upvestinvestmentapi.upvestinvestmentapi_client import UpvestinvestmentapiClient
client = UpvestinvestmentapiClient(
client_credentials_auth_credentials=ClientCredentialsAuthCredentials(
oauth_client_id='OAuthClientId',
oauth_client_secret='OAuthClientSecret',
oauth_scopes=[
OauthScope.ACCOUNTSREAD,
OauthScope.ACCOUNTSADMIN
]
),
http_signature_credentials=HttpSignatureCredentials(
key_id='KeyId',
private_key_file='/path/to/upvest-http-sign-key.pem',
private_key_passphrase='PrivateKeyPassphrase'
),
environment=Environment.PRODUCTION,
logging_configuration=LoggingConfiguration(
log_level=logging.INFO,
request_logging_config=RequestLoggingConfiguration(
log_body=True
),
response_logging_config=ResponseLoggingConfiguration(
log_headers=True
)
)
)
Environment-Based Client Initialization
from upvestinvestmentapi.upvestinvestmentapi_client import UpvestinvestmentapiClient
# Specify the path to your .env file if it’s located outside the project’s root directory.
client = UpvestinvestmentapiClient.from_environment(dotenv_path='/path/to/.env')
See the Environment-Based Client Initialization section for details.
Environments
The SDK can be configured to use a different environment for making API calls. Available environments are:
Fields
| Name | Description |
|---|---|
| PRODUCTION | Default Sandbox environment |
| ENVIRONMENT2 | Live environment |
Authorization
This API uses the following authentication schemes.
HTTP Signatures
On top of the OAuth 2 token, every request to the Upvest Investment API has to
carry a cryptographic signature. The SDK creates it for you once you pass
http_signature_credentials to the client — see
HTTP Signatures for details.
List of APIs
- Access Tokens
- Webhook Subscriptions
- User Identifiers
- User Checks
- Tax Exemptions
- Tax Wrappers
- Account Groups
- Reference Accounts
- Direct Debits
- Credit Fundings
- Cash Balance Transfers
- Virtual Bank Accounts
- Cash Balances
- Price Data
- Tax Residencies
- Fees Configurations
- Transaction Fees Models
- Portfolios Rebalancing
- Virtual Cash Balances
- Savings Plans
- Securities Transfers
- Account Transfers
- ISA Transfers
- Business Checks
- Files
- Users
- Accounts
- Mandates
- Top-Ups
- Withdrawals
- Instruments
- Orders
- Positions
- Reports
- Transactions
- Fees
- Portfolios
- Valuations
- Liquidations
- Returns
- Tests
- Businesses
- Roles
SDK Infrastructure
Configuration
- ProxySettings
- Environment-Based Client Initialization
- AbstractLogger
- LoggingConfiguration
- RequestLoggingConfiguration
- ResponseLoggingConfiguration
HTTP
Utilities
Metadata
Release files for uv-apimatic-sdk 0.0.1
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 | Actions |
|---|---|---|---|---|
| uv_apimatic_sdk-0.0.1.tar.gz | 328.7 kB | Without provenance | Details for uv_apimatic_sdk-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uv_apimatic_sdk-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for uv_apimatic_sdk-0.0.1-py3-none-any.whl |
Total release size: 1.2 MB
Release files / uv_apimatic_sdk-0.0.1.tar.gz
| Download URL | uv_apimatic_sdk-0.0.1.tar.gz |
|---|---|
| Size | 328.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a047c72fc0c19cd7c0003bcff66207ffeddb7d09394d2a72abf0e65ce668ae5
|
|
BLAKE2b-256 checksum How to use checksums |
99015df9bd0273bf26301ac651976f6b82906218d5f48b61c0a4c7de91894e42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.3 CPython/3.13.15 Linux/6.1.158.2-microsoft-standard
|
Release files / uv_apimatic_sdk-0.0.1-py3-none-any.whl
| Download URL | uv_apimatic_sdk-0.0.1-py3-none-any.whl |
|---|---|
| Size | 899.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d61ba99b3ac7c663fe81cd1682b92355c02a9179ee6368847aefb5dd21f3134
|
|
BLAKE2b-256 checksum How to use checksums |
ae2b3b5e49e8b8633f3b7bad83d609ccf33688ddcaaea95a9be5b4561be4a983
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.3 CPython/3.13.15 Linux/6.1.158.2-microsoft-standard
|
Security for uv-apimatic-sdk 0.0.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.