### Get Account Example (JSON) Source: https://docs.upvest.co/api/Accounts Example JSON response when retrieving account details. It includes metadata about the response and a list of account objects. ```json { "meta": { "offset": 0, "limit": 100, "count": 1, "total_count": 1, "sort": "created_at", "order": "ASC" }, "data": [ { "id": "ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd", "created_at": "2020-08-24T14:15:22Z", "updated_at": "2020-08-24T14:15:22Z", "account_group_id": "fa2414ed-8d62-46fd-85ed-565a340c81d6", "type": "TRADING", "users": [ { "id": "9c36af78-91a0-4174-a515-fc81214e3dab", "type": "OWNER" } ], "account_number": 1, "name": "Main account", "status": "ACTIVE" } ] } ``` -------------------------------- ### Savings Plan Response Example (JSON) Source: https://docs.upvest.co/api/Savings-Plans Example JSON response for a successfully retrieved savings plan. Includes details such as ID, creation/update timestamps, user and account information, plan name, type, instrument details, cash amount, currency, start date, period, interval, and status. ```json { "id": "fc34d28e-38f5-49d2-92f6-82acb79098f4", "created_at": "2023-07-21T14:10:00.00Z", "updated_at": "2023-07-21T15:10:00.00Z", "user_id": "4b9732bd-7496-4913-8a5f-6360479d7fed", "account_id": "00ef0be8-d564-43af-b3c7-11b7a2188030", "name": "Instrument savings plan", "type": "INSTRUMENT", "instrument_id": "DE0007664005", "instrument_id_type": "ISIN", "cash_amount": "100.00", "currency": "EUR", "start_date": "2023-07-24", "period": "WEEK", "interval": 1, "status": "ACTIVE" } ``` -------------------------------- ### HTTP Signatures Implementation Guides Source: https://docs.upvest.co/documentation/concepts/api_concepts/http_signatures/index_http_signatures Provides links to tutorials and guides for implementing HTTP signature versions v6 and v15, as well as a guide for upgrading from v6 to v15. ```APIDOC ## Implementation Guides ### Description Tutorials and guides are available to assist in implementing and upgrading HTTP signature versions. ### Guides - **Implementing HTTP signatures v6**: Learn how to implement signatures v6. - **Implementing HTTP signatures v15**: Learn how to implement signatures v15. - **Upgrade HTTP signatures from v6 to v15**: Learn how to upgrade from v6 to v15. ``` -------------------------------- ### Clone HTTP Signature Examples Repository Source: https://docs.upvest.co/documentation/getting_started/http_signatures/implementing_http_signatures_samples Command to clone the 'http-signature-examples' repository from GitHub. This allows users to download and experiment with the provided code samples locally. ```bash git clone git@github.com:upvestco/http-signature-examples ``` -------------------------------- ### Create Account Response Example (JSON) Source: https://docs.upvest.co/api/Accounts Example JSON response upon successful account creation. It returns the details of the newly created account. ```json { "id": "ad45b27f-c0e7-4cfb-b48c-a83670dbdfbd", "created_at": "2020-08-24T14:15:22Z", "updated_at": "2020-08-24T14:15:22Z", "account_group_id": "fa2414ed-8d62-46fd-85ed-565a340c81d6", "type": "TRADING", "users": [ { "id": "9c36af78-91a0-4174-a515-fc81214e3dab", "type": "OWNER" } ], "account_number": 1, "name": "Main account", "status": "ACTIVE" } ``` -------------------------------- ### Create Reference Account - API Response Example Source: https://docs.upvest.co/api/Reference-Accounts Example of a successful response after creating a new reference account. Includes details of the created account. ```json { "id": "c18f80bd-401e-4836-9776-7dc24c32d35e", "created_at": "2020-08-24T14:15:22Z", "updated_at": "2020-08-24T14:15:22Z", "user_id": "83d83ec2-d2ca-49ff-bbea-b92b5c3be202", "account_owner": "Max Mustermann", "name": "Max's Reference Account", "iban": "DE0210**********0402", "bic": "BELADEBE", "confirmed_at": "2020-08-23T14:15:22Z" } ``` -------------------------------- ### Generate HTTP Signatures in Python and Javascript Source: https://docs.upvest.co/documentation/getting_started/http_signatures/implementing_http_signatures_samples Provides code examples for creating HTTP message signatures using Python and Javascript. The Python version can leverage the 'upvest-investment-api' package for easier implementation. These examples are useful for interacting with the Upvest Investment API. ```python # Example Python code for HTTP signature generation (conceptual) # Refer to the upvest-investment-api package for actual implementation def create_signature(method, url, body, private_key): # ... implementation details ... pass ``` ```javascript // Example Javascript code for HTTP signature generation (conceptual) // Refer to the http-signature-examples repository for actual implementation async function createSignature(method, url, body, privateKey) { // ... implementation details ... return signature; } ``` -------------------------------- ### Virtual Cash Management Guide Source: https://docs.upvest.co/news Provides a guide on virtual cash management using the Investment API. This feature allows tracking and managing virtual funds, enabling pre-order increases and post-execution decreases. ```APIDOC ## Virtual Cash Management ### Description A guide detailing the virtual cash management system within the Investment API. This system tracks and manages virtual funds for end-users, allowing for flexible cash handling related to order placements and executions. ### Key Features - **Pre-order Increase:** Trigger an increase in virtual cash before an order is placed. - **Post-execution Decrease:** Trigger a decrease in virtual cash after an order has been executed. ### Use Cases - Simplifies tracking of unsettled cash. - Portfolio management and rebalancing. - Automatic reinvestment of cash dividends. - Sales to cover fees. - Reinvestment of tax refunds. ### Related Endpoints - **POST /accounts/{account_id}/cash-transactions** (Example endpoint for managing virtual cash) - **Description:** Manages virtual cash movements within an account. - **Request Body:** - `amount` (decimal) - Required - The amount to increase or decrease. - `currency` (string) - Required - The currency of the amount. - `type` (string) - Required - Type of transaction (e.g., 'increase', 'decrease'). - `reference` (string) - Optional - A reference for the transaction. - **Example Request:** ```json { "amount": "1000.00", "currency": "EUR", "type": "increase", "reference": "pre_order_funding" } ``` - **Success Response (200):** - `balance` (object) - The updated virtual cash balance. - `transaction_id` (string) - The ID of the cash transaction. ``` -------------------------------- ### Create Portfolio Savings Plan Request (JSON) Source: https://docs.upvest.co/documentation/guides/saving_plans/saving_plans_create Example JSON payload for creating a portfolio savings plan. It includes user and account IDs, plan type, investment amount, currency, start date, and cadence details. ```json { "user_id": "4b9732bd-7496-491-8a5f-6360479d7fed", "account_id": "00ef0be8-d564-43af-b3c7-11b7a2188030", "type": "PORTFOLIO", "cash_amount": "100.00", "currency": "EUR", "start_date" : "2023-07-24", "period": "WEEK", "interval" : "1" } ``` -------------------------------- ### Get Instrument Venues Response Example (JSON) Source: https://docs.upvest.co/api/Price-Data Example JSON response for the 'Get instrument venues' API endpoint. This response lists the venues where a specific financial instrument is traded and for which price data is available, including the types of price data (e.g., EOD, REALTIME). ```json { "data": [ { "id": "20d6024b-2df4-41ae-8d42-62e4744e455b", "name": "Tradegate", "price_qualities": [ "EOD", "REALTIME" ] } ] } ``` -------------------------------- ### Get Fee Collections (API Response Example) Source: https://docs.upvest.co/api/Fees This snippet shows an example JSON response when retrieving a list of fee collections. It includes metadata about the pagination and the fee collection data itself, such as IDs, dates, amounts, and status. The response format is consistent for successful GET requests to the /fees/collections endpoint. ```json { "meta": { "offset": 0, "limit": 100, "count": 3, "total_count": 3, "sort": "id", "order": "ASC" }, "data": [ { "id": "d77e6924-9bb7-4db0-addc-404442258f4b", "created_at": "2022-11-30T14:16:22Z", "updated_at": "2022-11-30T14:16:22Z", "account_id": "689f7566-2ca3-4007-b99d-e501be8c7783", "account_group_id": "999f7566-2ca3-4007-b99d-e501be8c7222", "type": "SERVICE_FEE", "collection_amount": "12.41", "processed_amount": { "cash_balance": "6.50", "sell_to_cover": "0" }, "currency": "EUR", "status": "PROCESSING", "period_start": "2022-11-01", "period_end": "2022-11-30" }, { "id": "7c5f2b11-7078-4bb9-8ed8-9dcf5eb7597f", "created_at": "2022-11-30T14:16:22Z", "updated_at": "2022-11-30T14:16:22Z", "account_id": "5b8b1e66-cf3c-40f3-94d3-c94f2ac7abb7", "account_group_id": "87805651-ad25-4a85-8c04-88a666164ad4", "type": "SERVICE_FEE", "collection_amount": "82.12", "processed_amount": { "cash_balance": "40.00", "sell_to_cover": "42.12" }, "currency": "EUR", "status": "FINALISED", "period_start": "2022-09-01", "period_end": "2022-12-31" }, { "id": "85fba2a0-da2f-46ac-a2a8-b4e7c66cb375", "created_at": "2022-11-30T14:16:22Z", "updated_at": "2022-11-30T14:16:22Z", "account_id": "c28b6611-7ac1-405a-8eb7-ab3b35caccc2", "account_group_id": "f930f9d4-3e21-4ad5-a266-730821d9a9fc", "type": "SERVICE_FEE_LIQUIDATION", "collection_amount": "65.30", "processed_amount": { "cash_balance": "0.00", "sell_to_cover": "0.00" }, "currency": "EUR", "status": "CANCELLED", "period_start": "2022-03-01", "period_end": "2022-07-30" } ] } ``` -------------------------------- ### Example HTTP Request with Signature Version - HTTP Source: https://docs.upvest.co/documentation/getting_started/http_signatures/implementing_http_signatures_v15 This is a complete example of an HTTP POST request that includes the `upvest-signature-version: 15` header. This demonstrates how to format the request with all necessary headers and the signature version specified, preparing it for signing. ```http POST /endpoint?a=b HTTP/1.1 host: server accept: application/json authorization: Bearer the-OAuth2-access-token-goes-here content-Length: 16 content-Type: application/json date: Wed, 06 Oct 2021 16:14:19 CEST expires: Wed, 06 Oct 2021 16:14:24 CEST idempotency-key: 424e8603-f12c-4a58-8eb1-5edfe471f3ab upvest-client-id: 5ec16164-6173-461d-b90d-116d68f55b40 upvest-signature-version: 15 {"key": "value"} ``` -------------------------------- ### Get Account Group by ID (JSON Response Example) Source: https://docs.upvest.co/api/Account-Groups This snippet provides an example JSON response for the 'get /account_groups/{account_group_id}' endpoint. It illustrates the detailed structure of a single account group object, including its ID, timestamps, type, status, associated users, and securities account number. ```json { "id": "9d95820d-4333-46b6-98de-04ab7512e76f", "created_at": "2020-08-24T14:15:22Z", "updated_at": "2020-08-24T14:15:22Z", "type": "PERSONAL", "status": "ACTIVE", "users": [ { "id": "413715f2-5401-4b97-8055-034a6b879f8c", "type": "OWNER" } ], "securities_account_number": "123456789" } ``` -------------------------------- ### Create Webhook Subscription - Request Example Source: https://docs.upvest.co/api/Webhook-Subscriptions Example JSON payload for creating a new webhook subscription. This includes the title, callback URL, event types to subscribe to, and optional configuration for delay and package size. ```json { "title": "User webhook", "url": "https://tenant.tld/webhooks/users", "type": [ "USER" ], "config": { "delay": "1s", "max_package_size": 51200 } } ``` -------------------------------- ### Get Instrument API Response Example Source: https://docs.upvest.co/api/Instruments Example JSON response when retrieving a single instrument by its ID. The response contains detailed information about the specified instrument. ```json { "id": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2022-08-31T17:28:00.00Z", "updated_at": "2022-08-31T17:28:00.00Z", "isin": "DE0007664005", "wkn": "766400", "name": "Volkswagen (VW) St. Aktie.", "fractional_trading": true, "trading_status": "ACTIVE" } ``` -------------------------------- ### List Savings Plans Response Example (JSON) Source: https://docs.upvest.co/api/Savings-Plans Example JSON response for listing savings plans. Includes a 'meta' object with pagination and sorting details, and a 'data' array containing savings plan objects. ```json { "meta": { "offset": 0, "limit": 100, "count": 1, "total_count": 1, "sort": "id", "order": "ASC" }, "data": [ { "id": "fc34d28e-38f5-49d2-92f6-82acb79098f4", "created_at": "2023-07-21T14:10:00.00Z", "updated_at": "2023-07-21T15:10:00.00Z", "user_id": "4b9732bd-7496-4913-8a5f-6360479d7fed", "account_id": "00ef0be8-d564-43af-b3c7-11b7a2188030", "name": "Instrument savings plan", "type": "INSTRUMENT", "instrument_id": "DE0007664005", "instrument_id_type": "ISIN", "cash_amount": "100.00", "currency": "EUR", "start_date": "2023-07-24", "period": "WEEK", "interval": 1, "status": "ACTIVE" } ] } ``` -------------------------------- ### Get User Reference Accounts - API Example Source: https://docs.upvest.co/api/Reference-Accounts Example of how to retrieve a list of reference accounts for a specific user. This API call supports sorting and pagination parameters. ```json { "meta": { "offset": 0, "limit": 100, "count": 1, "total_count": 1 }, "data": [ { "id": "c18f80bd-401e-4836-9776-7dc24c32d35e", "created_at": "2020-08-24T14:15:22Z", "updated_at": "2020-08-24T14:15:22Z", "user_id": "83d83ec2-d2ca-49ff-bbea-b92b5c3be202", "account_owner": "Max Mustermann", "name": "Max's Reference Account", "iban": "DE0210**********0402", "bic": "BELADEBE", "confirmed_at": "2020-08-23T14:15:22Z" } ] } ``` -------------------------------- ### Example HTTP Request with Signature Headers Source: https://docs.upvest.co/documentation/getting_started/http_signatures/implementing_http_signatures_v6 An example of a complete HTTP POST request including the newly constructed 'signature-input' and 'signature' headers, along with other necessary headers and the request body. ```http POST /endpoint?a=b HTTP/1.1 host: server accept: application/json authorization: Bearer the-OAuth2-access-token-goes-here content-length: 16 content-type: application/json date: Wed, 06 Oct 2021 16:14:19 CEST digest: SHA-256=6alpwuzt6j/qxb25kIuW6T1vsr57nLFFAXP+VOlhTlg= expires: Wed, 06 Oct 2021 16:14:24 CEST idempotency-key: 424e8603-f12c-4a58-8eb1-5edfe471f3ab signature: sig1=:MIGHAkIAoTnL0VRsu66l+nb91Dfhpq+Fr88fdiy+FgkuYjRjQh0IFROEUEjFQOj5tPu+Ms5Z4llhWhGSw602ZivIZWwum8gCQWPUTjp9zAT8KgkH1Dynxw0nmYHZPAOaLKT2mGZ1YI/o6OjBVy5RkdGVw80IWc0QM3XXeoyH7A+EKdJ2wvUAvBQp: signature-input: sig1=("@method" "@path" "@query" "accept" "authorization" "content-length" "content-type" "digest" "idempotency-key" "upvest-client-id");keyid="8d4997a8-cf7a-4e51-adbb-401656a3e5c2";created=1633529659;expires=1633529664;nonce="o085M4cMgpbicuOL" upvest-client-id: 5ec16164-6173-461d-b90d-116d68f55b40 {"key": "value"} ``` -------------------------------- ### Get Instrument Latest Price Response Example (JSON) Source: https://docs.upvest.co/api/Price-Data Example JSON response for the 'Get instrument latest price' API endpoint. This response provides the most recent price information for an instrument at a given venue, including currency, bid/ask prices with sizes, and the last traded price. Note that updates are typically only available on trading days. ```json { "price_quality": "REALTIME", "currency": "EUR", "bids": [ { "time": "2023-01-09T13:02:15Z", "price": "210.01", "size": "100" } ], "asks": [ { "time": "2023-01-09T13:02:15Z", "price": "212.32", "size": "50" } ], "last_trade": { "time": "2023-01-09T12:59:04Z", "price": "211.32", "size": "40" } } ``` -------------------------------- ### Get User Account Groups (JSON Response Example) Source: https://docs.upvest.co/api/Account-Groups This snippet shows an example JSON response for the 'get /users/{user_id}/account_groups' endpoint. It details the structure of account group data, including metadata and a list of user account group objects. The response includes fields like id, created_at, updated_at, type, status, users, and securities_account_number. ```json { "meta": { "offset": 0, "limit": 100, "count": 1, "total_count": 1, "sort": "id", "order": "ASC" }, "data": [ { "id": "9d95820d-4333-46b6-98de-04ab7512e76f", "created_at": "2020-08-24T14:15:22Z", "updated_at": "2020-08-24T14:15:22Z", "type": "PERSONAL", "status": "ACTIVE", "users": [ { "id": "9c36af78-91a0-4174-a515-fc81214e3dab", "type": "OWNER" } ], "securities_account_number": "123456789" } ] } ``` -------------------------------- ### Get Instrument OHLC Prices Response Example (JSON) Source: https://docs.upvest.co/api/Price-Data Example JSON response for the 'Get instrument OHLC prices' API endpoint. This response details historical Open, High, Low, and Close prices for an instrument over a specified period and interval. It includes currency, time, and volume. The response may include days with zero volume depending on the interval requested. ```json { "data": [ { "currency": "EUR", "time": "2023-01-09", "open": "213.32", "high": "215.32", "low": "210.32", "close": "213.22", "volume": "277973" }, { "currency": "EUR", "time": "2023-01-10", "open": "214.42", "high": "214.42", "low": "213.22", "close": "213.22", "volume": "260335" } ], "meta": { "count": 2 } } ``` -------------------------------- ### Webhook Signature Validation Example Signature-Input Source: https://docs.upvest.co/documentation/getting_started/implementing_webhooks/webhooks_handler Illustrates the format of the '@signature-params' component within the 'Signature-Input' header, which specifies the components included in the signature and their associated metadata. ```text ("content-length" "@method" "@path" "digest");keyid="9f030355-3da5-4417-b3fe-4726f462b4b7";created=1635425273;nonce="0343692993";expires=1635425333 ``` -------------------------------- ### Get User Accounts (REST API Example) Source: https://docs.upvest.co/api/Accounts This snippet demonstrates how to retrieve a list of accounts for a specific user using a RESTful API call. It includes example parameters for sorting and pagination. The response is in JSON format. ```HTTP GET /users/{user_id}/accounts?sort=created_at&order=DESC&offset=0&limit=100 HTTP/1.1 Host: api.upvest.co Authorization: Bearer YOUR_API_TOKEN ``` -------------------------------- ### Get Orders for an Account by ID - API Response Example Source: https://docs.upvest.co/api/Orders This is an example JSON response for the 'Get orders for an account by ID' API endpoint. It includes metadata about the query results and a list of order objects, each containing details such as ID, creation/update times, user and account information, financial amounts, instrument details, status, fees, and execution information. This response structure is crucial for understanding the data format when retrieving order history. ```json { "meta": { "offset": 0, "limit": 100, "count": 1, "total_count": 1, "sort": "id", "order": "ASC" }, "data": [ { "id": "eb5ba93f-5dfe-4bf1-8571-4da0caacc80c", "created_at": "2021-07-21T14:10:00.00Z", "updated_at": "2021-07-21T14:10:00.00Z", "user_id": "2dedfeb0-58cd-44f2-ae08-0e41fe0413d9", "account_id": "debf2026-f2da-4ff0-bb84-92e45babb1e3", "cash_amount": "56.65", "currency": "EUR", "side": "BUY", "instrument_id": "US0378331005", "instrument_id_type": "ISIN", "order_type": "MARKET", "quantity": "0.05", "user_instrument_fit_acknowledgement": true, "limit_price": "", "stop_price": "", "status": "FILLED", "fee": "0.5", "executions": [ { "id": "b9dc0676-8a7d-412d-802a-3b325eefd15e", "side": "BUY", "currency": "EUR", "status": "FILLED", "order_id": "eb5ba93f-5dfe-4bf1-8571-4da0caacc80c", "cash_amount": "56.65", "share_quantity": "0.05", "price": "130.65", "transaction_time": "2021-07-21T14:10:00.00Z", "taxes": [ { "amount": "1.3", "type": "TOTAL" } ], "venue_id": "20d6024b-2df4-41ae-8d42-62e4744e455b" } ], "client_reference": "", "initiation_flow": "API" } ] } ``` -------------------------------- ### Check GPG Installation Source: https://docs.upvest.co/documentation/getting_started/PGP_keys/cheatsheet_PGP_keys Verifies if GPG is installed on the system by running the 'gpg --help' command. This is a basic check to ensure GPG is available for use. It does not require any specific inputs or produce structured output, only confirms command execution. ```bash gpg --help ``` -------------------------------- ### Get User Checks - API Response Example Source: https://docs.upvest.co/api/User-Checks This JSON response example details the structure of checks returned for a specific user. It includes information about KYC, instrument suitability, POR, and compliance checks, along with their status and relevant data. ```json { "data": [ { "id": "008a82d0-c5a4-4410-9318-d34786429c5a", "user_id": "7b39529a-e68c-4688-8242-7549d10d6084", "type": "KYC", "check_confirmed_at": "2019-08-24T14:15:22Z", "data_download_link": "https://bucket.customer.com/ident/user3.zip", "document_type": "ID_CARD", "document_expiration_date": "2030-01-01", "nationality": "DE", "status": "PASSED", "provider": "KYC provider", "method": "VIDEO_ID", "confirmed_address": { "address_line1": "Rosenweg 221", "address_line2": "apt. 33", "postcode": "45678", "city": "Berlin", "state": "BE", "country": "DE" } }, { "id": "a680ff52-3a96-4e82-a2ab-12563bbd1a2e", "user_id": "7b39529a-e68c-4688-8242-7549d10d6084", "type": "INSTRUMENT_FIT", "check_confirmed_at": "2020-08-24T14:15:22Z", "status": "PASSED", "instrument_suitability": { "suitability": true } }, { "id": "b633a915-ed3c-43d7-afb5-a550f26ccb0d", "user_id": "7b39529a-e68c-4688-8242-7549d10d6084", "type": "POR", "check_confirmed_at": "2020-08-24T14:15:22Z", "issuance_date": "2020-01-01", "data_download_link": "https: //bucket.customer.com/por/user3.zip", "document_type": "UTILITY_BILL", "status": "PASSED", "confirmed_address": { "address_line1": "Rosenweg 221", "address_line2": "apt. 33", "postcode": "45678", "city": "Berlin", "state": "BE", "country": "DE" } }, { "id": "76aa72aa-3738-4640-bad5-68c1196dc758", "user_id": "7b39529a-e68c-4688-8242-7549d10d6084", "type": "COMPLIANCE", "check_confirmed_at": "2020-08-24T14:15:22Z", "status": "PASSED" } ] } ``` -------------------------------- ### Get Signing Keys - JWKS Example Source: https://docs.upvest.co/api/Webhook-Subscriptions Example of JWKS signing public keys used to verify webhooks. This JSON structure contains an array of keys, each with a key ID (kid), key type (kty), curve (crv), and coordinates (x, y). ```json { "keys": [ { "kid": "9ed77463-c18e-4794-ab5c-17423f9b801a", "kty": "EC", "crv": "P-521", "x": "AcYAf5Ou0UvtehpeRvyhnvvrUQvjI4B3VCxfSmxK4gqKJGxO_jTB-nTdrHbBfmZpwmwYR86DppMg43E579K5MQ54", "y": "ALkrId77iD0Ye2vBS5bTkLqPH-bo8urTpTXiNc6Ub-VOFbXfJrR0tQ8COvVXXu58BTu8jWV-1mtbjfJpDl3ISbcK" } ] } ``` -------------------------------- ### Webhook Signature Validation Example Signature Input String Source: https://docs.upvest.co/documentation/getting_started/implementing_webhooks/webhooks_handler Demonstrates the construction of the full signature input string by concatenating the component values and '@signature-params', as used in the signature validation process. ```text content-length: 1177 @method: POST @path: /webhooks/users digest: SHA-256=2f0qZGzgUQ/jIS9v0aHA1z6sOAnL1trgSuhTVxdAzSY= @signature-params: ("content-length" "@method" "@path" "digest");keyid="9f030355-3da5-4417-b3fe-4726f462b4b7";created=1635425273;nonce="0343692993";expires=1635425333 ``` -------------------------------- ### Get All Users API Response Example Source: https://docs.upvest.co/api/Users This is an example of a successful response when retrieving a list of all users. It includes metadata about the pagination and sorting applied, as well as an array of user objects, each containing detailed personal and address information. Note that some address fields may be null. ```json { "meta": { "offset": 0, "limit": 100, "count": 1, "total_count": 1, "sort": "created_at", "order": "ASC" }, "data": [ { "id": "83d83ec2-d2ca-49ff-bbea-b92b5c3be202", "created_at": "2021-07-21T14:10:00.00Z", "updated_at": "2021-07-21T14:10:00.00Z", "first_name": "Karl", "last_name": "Schmidt", "salutation": "SALUTATION_MALE", "title": "DR", "birth_date": "1972-09-30", "birth_city": "Berlin", "birth_country": "DE", "birth_name": "Schmidt", "nationalities": [ "DE", "AU" ], "postal_address": { "address_line1": "Rosenweg 221", "address_line2": "apt. 33", "postcode": "45678", "city": "Berlin", "state": "BE", "country": "DE" }, "address": { "address_line1": "Rosenweg 221", "address_line2": "apt. 33", "postcode": "45678", "city": "Berlin", "state": "BE", "country": "DE" }, "status": "ACTIVE" }, { "id": "287673ef-1bae-4d8a-9e78-8ddaae249d72", "created_at": "2021-07-21T14:10:00.00Z", "updated_at": "2021-07-21T14:10:00.00Z", "first_name": "John", "last_name": "Doe", "salutation": "SALUTATION_MALE", "title": "PROF_DR", "birth_date": "1970-10-01", "birth_city": "Berlin", "birth_country": "DE", "birth_name": "Schmidt", "nationalities": [ "DE", "AU" ], "postal_address": null, "address": { "address_line1": "Rosenweg 221", "address_line2": "apt. 33", "postcode": "45678", "city": "Berlin", "state": "BE", "country": "DE" }, "status": "ACTIVE" } ] } ``` -------------------------------- ### Get Current Account Valuation (JSON Response Example) Source: https://docs.upvest.co/api/Valuations This example demonstrates the JSON structure for a successful response when retrieving the current valuation of an account. It includes details like valuation time, account ID, price quality, total security value, and a breakdown of security positions. ```json { "id": "404b170a-9042-11ed-9a51-2eabd0c03f8a", "created_at": "2023-01-10T14:15:22Z", "updated_at": "2023-01-10T14:15:22Z", "valuation_time": "2023-01-10T14:15:22Z", "account_id": "51cdc0cc-9042-11ed-b017-2eabd0c03f8a", "price_quality": "EOD", "total_security_value": { "amount": "142.29", "currency": "EUR" }, "security_positions": [ { "instrument": { "uuid": "123e4567-e89b-12d3-a456-426614174000", "isin": "DE0007664005" }, "value": { "amount": "104.81", "currency": "EUR", "price_time": "2023-01-09" }, "quantity": "0.65", "weight": "0.736595", "price_quality": "EOD" }, { "instrument": { "uuid": "48b798b7-3a62-4f30-8307-ee94d35b21b7", "isin": "FR0010524777" }, "value": { "amount": "37.48", "currency": "EUR", "price_time": "2023-01-09" }, "quantity": "1.00", "weight": "0.263405", "price_quality": "EOD" }, { "instrument": { "uuid": "7499ccf8-6fa5-43ef-af9e-dd062e10ab59", "isin": "SE0019889775" }, "quantity": "5.00", "value": null, "weight": null, "price_quality": "NA" } ] } ``` -------------------------------- ### User Tax Onboarding Source: https://docs.upvest.co/news Announces the availability of user tax onboarding functionality via the Investment API, detailing the required information and API interaction for tax compliance. ```APIDOC ## User Tax Onboarding API ### Description This documentation outlines the user tax onboarding process available through the Investment API. It explains why Upvest requires additional tax-related information before account opening, the specific information needed, and how to use the API endpoints to fulfill these requirements. ### Related Endpoints Refer to the API reference for specific endpoints related to user tax information submission. These endpoints will likely involve: - **POST /users/{user_id}/tax-information** - **Description:** Submits tax-related information for a user. - **Request Body:** Contains fields for tax residency, identification numbers, etc. (specific fields detailed in API reference). - **Success Response (200):** Confirmation of successful submission. - **GET /users/{user_id}/tax-status** - **Description:** Retrieves the current tax onboarding status for a user. - **Success Response (200):** Status details (e.g., 'pending', 'completed', 'requires_action'). ``` -------------------------------- ### List Webhook Subscriptions - Response Example Source: https://docs.upvest.co/api/Webhook-Subscriptions Example JSON response for listing all webhook subscriptions. It includes metadata about the pagination and an array of webhook subscription objects, each with details like ID, creation/update times, title, URL, event types, and configuration. ```json { "meta": { "offset": 0, "limit": 100, "count": 1, "total_count": 1, "sort": "id", "order": "ASC" }, "data": [ { "id": "a8eb3540-5a84-40f9-b2bb-7f99f282fc5a", "created_at": "2021-07-21T14:10:00.00Z", "updated_at": "2021-07-21T14:10:00.00Z", "title": "User webhook", "url": "https://tenant.tld/webhooks/users", "type": [ "USER" ], "enabled": false, "config": { "delay": "5s", "max_package_size": 10240 } } ] } ``` -------------------------------- ### Get All Account Groups (JSON Response Example) Source: https://docs.upvest.co/api/Account-Groups This JSON snippet demonstrates the response structure for the 'get /account_groups' endpoint, which retrieves a list of all account groups. It includes pagination metadata (offset, limit, count, total_count) and an array of account group objects, similar to the user-specific endpoint. ```json { "meta": { "offset": 0, "limit": 100, "count": 1, "total_count": 1, "sort": "created_at", "order": "ASC" }, "data": [ { "id": "9d95820d-4333-46b6-98de-04ab7512e76f", "created_at": "2020-08-24T14:15:22Z", "updated_at": "2020-08-24T14:15:22Z", "type": "PERSONAL", "status": "ACTIVE", "users": [ { "id": "9c36af78-91a0-4174-a515-fc81214e3dab", "type": "OWNER" } ], "securities_account_number": "123456789" } ] } ``` -------------------------------- ### Get Order by ID Request Example Source: https://docs.upvest.co/api/Orders This section outlines the request to retrieve a specific order using its unique identifier. It involves a GET request to the `/orders/{order_id}` endpoint, where `{order_id}` is a path parameter representing the UUID of the order to be fetched. Successful requests return the order details in JSON format. ```http GET /orders/eb5ba93f-5dfe-4bf1-8571-4da0caacc80c HTTP/1.1 Host: api.upvest.co Accept: application/json ```