All accounts returns related paths.

List account returns

get /accounts/{account_id}/returns

List account returns

OAuth2 oauth-client-credentials

Required Scopes:

account_returns:read

All Scopes

  • account_liquidations:admin · Trigger/read/cancel accounts liquidations
  • account_liquidations:read · Read accounts liquidations
  • account_returns:read · Read accounts returns
  • accounts:admin · Create/update/delete accounts and account groups
  • accounts:read · Read accounts and account groups
  • checks:admin · Create checks
  • checks:read · Read checks
  • credit_fundings:read · Credit Fundings read operations
  • fees:admin · Create and read fee operations
  • fees:read · Read fee operations
  • instruments:read · Read instruments
  • mandates:admin · Create/update/delete mandates
  • mandates:read · Read mandates
  • orders:admin · Create/update/delete orders
  • orders:read · Read orders
  • payments:admin · Payins and withdrawal operations
  • payments:read · Payins and withdrawal read operations
  • portfolios:admin · Modify portfolios
  • portfolios:read · Read portfolios
  • positions:read · Read positions
  • reference_accounts:admin · Create/update/delete reference accounts
  • reference_accounts:read · Read reference accounts
  • reports:read · Read reports
  • taxes:admin · Modify tax residencies
  • taxes:read · Read tax residencies
  • topups:admin · Topups operations
  • topups:read · Topups read operations
  • transactions:read · Read cash and securities transactions
  • users:admin · Create/update/delete users
  • users:read · Read users
  • valuations:read · Read valuations
  • webhooks:admin · Create/update/delete webhooks
  • webhooks:read · Read webhooks
Flow Type:
Client Credentials
Token URL:
https://sandbox.upvest.co/auth/token

upvest-client-id

string

uuid

required

Tenant Client ID

Example
"ebabcf4d-61c3-4942-875c-e265a7c2d062"

authorization

string

^Bearer [a-zA-Z0-9\-\._~+/]*=*

required

Bearer (access) token from the OAuth flow with correct scopes. https://datatracker.ietf.org/doc/html/rfc6750

Example
"Bearer c2VjcmV0Cg=="

signature

string

required

https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header

signature-input

string

required

https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he

upvest-api-version

string

Upvest API version (Note: Do not include quotation marks)

Default
"1"
Enum
  • 1
Example
1

account_id

string

uuid

required

Account unique identifier.

start_date

string

Returns account returns starting from and including this date (UTC)

Example
"2023-08-15"

end_date

string

Returns account returns up until this date (UTC)

Example
"2023-08-15"

sort

string

Sort the result by date.

Default
"date"
Enum
  • date

order

string

Sort order of the result list if the sort parameter is specified. Use ASC for ascending or DESC for descending sort order.

Default
"ASC"
Enum
  • ASC
  • DESC

offset

int

i32

Use the offset argument to specify where in the list of results to start when returning items for a particular query.

Min
0

limit

int

i32

Use the limit argument to specify the maximum number of items returned.

Default
100
Min
0
Max
1000

Response

Examples Schema

OK

{
  "data": [
    {
      "account_id": "bbe9e784-e009-4cb6-a07c-24831897327b",
      "date": "2023-09-01T00:00:00Z",
      "twr": {
        "cumulative": "0.0324353234",
        "cumulative_start_date": "2023-08-01T00:00:00Z",
        "daily": "0.0132434142"
      }
    },
    {
      "account_id": "bbe9e784-e009-4cb6-a07c-24831897327b",
      "date": "2023-09-02T00:00:00Z",
      "twr": {
        "cumulative": "0.0271528232",
        "cumulative_start_date": "2023-08-01T00:00:00Z",
        "daily": "-0.005116543491"
      }
    }
  ],
  "meta": {
    "count": 2,
    "limit": 100,
    "offset": 0,
    "order": "ASC",
    "sort": "date",
    "total_count": 2
  }
}

Bad Request. The incoming request had a malformed parameter/object.

{
  "status": 400,
  "type": "bad_request"
}

Unauthorized. The caller has not been authenticated.

{
  "status": 401,
  "type": "unauthorized"
}

Forbidden. The caller has been authenticated but is not allowed to take the requested action.

{
  "status": 403,
  "type": "forbidden"
}

Not Found. The requested resource could not be found.

{
  "status": 404,
  "type": "not_found"
}

Method Not Allowed. The requested method is not allowed on the requested resource.

{
  "status": 405,
  "type": "method_not_allowed"
}

Not Acceptable. The resource does not have a current representation that would be acceptable to the user agent. "Accept" header defined unsupported value.

{
  "status": 406,
  "type": "not_acceptable"
}

Too Many Requests. The caller has exceeded their quota for the time period and has been throttled.

{
  "status": 429,
  "type": "too_many_requests"
}

Internal Server Error. The service encountered an unexpected error.

{
  "status": 500,
  "type": "internal_server_error"
}

Service Unavailable. The service handling for this request cannot be reached at this time.

{
  "status": 503,
  "type": "method_not_allowed"
}

Gateway Timeout. The service gateway has reached its internal timeout.

{
  "status": 504,
  "type": "gateway_timeout"
}

meta

object (meta)

required

offset

int

required

Amount of resource to offset in the response.

limit

int

required

Total limit of the response.

count

int

required

Count of the resources returned in the response.

total_count

int

required

Total count of all the resources.

sort

string

The field that the list is sorted by.

order

string

The ordering of the response.

  • ASC - Ascending order
  • DESC - Descending order
Enum
  • ASC
  • DESC

data

array[object (Account Returns)]

required

Account Returns

object (Account Returns)

account_id

string

uuid

required

Account unique identifier.

date

string

date-time

required

Date when returns were calculated. RFC 3339-5, ISO8601 UTC

twr

object (twr)

required

daily

string

^-?[0-9]{0,63}(\.[0-9]{1,27})?$

cumulative

string

^-?[0-9]{0,63}(\.[0-9]{1,27})?$

cumulative_start_date

string

date-time

Date when the cumulative time-weighted returns calculation starts.

upvest-request-id

string

uuid

Example
"169ae4c7-ebd7-4041-94da-25369653eba7"

type

string

required

URL to a document describing the error condition.

status

int

required

Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

title

string

A short, human-readable title for the general error type; the title should not change for given types.

detail

string

A human-readable description of the specific error.

instance

string

This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

request_id

string

Correlation ID for the original request.

upvest-request-id

string

uuid

Example
"169ae4c7-ebd7-4041-94da-25369653eba7"

type

string

required

URL to a document describing the error condition.

status

int

required

Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

title

string

A short, human-readable title for the general error type; the title should not change for given types.

detail

string

A human-readable description of the specific error.

instance

string

This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

request_id

string

Correlation ID for the original request.

upvest-request-id

string

uuid

Example
"169ae4c7-ebd7-4041-94da-25369653eba7"

type

string

required

URL to a document describing the error condition.

status

int

required

Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

title

string

A short, human-readable title for the general error type; the title should not change for given types.

detail

string

A human-readable description of the specific error.

instance

string

This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

request_id

string

Correlation ID for the original request.

upvest-request-id

string

uuid

Example
"169ae4c7-ebd7-4041-94da-25369653eba7"

type

string

required

URL to a document describing the error condition.

status

int

required

Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

title

string

A short, human-readable title for the general error type; the title should not change for given types.

detail

string

A human-readable description of the specific error.

instance

string

This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

request_id

string

Correlation ID for the original request.

upvest-request-id

string

uuid

Example
"169ae4c7-ebd7-4041-94da-25369653eba7"

type

string

required

URL to a document describing the error condition.

status

int

required

Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

title

string

A short, human-readable title for the general error type; the title should not change for given types.

detail

string

A human-readable description of the specific error.

instance

string

This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

request_id

string

Correlation ID for the original request.

upvest-request-id

string

uuid

Example
"169ae4c7-ebd7-4041-94da-25369653eba7"

type

string

required

URL to a document describing the error condition.

status

int

required

Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

title

string

A short, human-readable title for the general error type; the title should not change for given types.

detail

string

A human-readable description of the specific error.

instance

string

This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

request_id

string

Correlation ID for the original request.

upvest-request-id

string

uuid

Example
"169ae4c7-ebd7-4041-94da-25369653eba7"

type

string

required

URL to a document describing the error condition.

status

int

required

Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

title

string

A short, human-readable title for the general error type; the title should not change for given types.

detail

string

A human-readable description of the specific error.

instance

string

This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

request_id

string

Correlation ID for the original request.

upvest-request-id

string

uuid

Example
"169ae4c7-ebd7-4041-94da-25369653eba7"

type

string

required

URL to a document describing the error condition.

status

int

required

Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

title

string

A short, human-readable title for the general error type; the title should not change for given types.

detail

string

A human-readable description of the specific error.

instance

string

This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

request_id

string

Correlation ID for the original request.

upvest-request-id

string

uuid

Example
"169ae4c7-ebd7-4041-94da-25369653eba7"

type

string

required

URL to a document describing the error condition.

status

int

required

Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

title

string

A short, human-readable title for the general error type; the title should not change for given types.

detail

string

A human-readable description of the specific error.

instance

string

This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

request_id

string

Correlation ID for the original request.

upvest-request-id

string

uuid

Example
"169ae4c7-ebd7-4041-94da-25369653eba7"

type

string

required

URL to a document describing the error condition.

status

int

required

Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

title

string

A short, human-readable title for the general error type; the title should not change for given types.

detail

string

A human-readable description of the specific error.

instance

string

This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

request_id

string

Correlation ID for the original request.

upvest-request-id

string

uuid

Example
"169ae4c7-ebd7-4041-94da-25369653eba7"

Account returns event

webhook

Account returns event

created_at

string

date-time

required

Date and time when the event was created. RFC 3339-5, ISO8601 UTC

id

string

uuid

required

Event unique identifier

object

object (object)

required

account_id

string

uuid

required

Account unique identifier.

date

string

date-time

required

Date when returns were calculated. RFC 3339-5, ISO8601 UTC

twr

object (twr)

required

cumulative

string

^-?[0-9]{0,63}(\.[0-9]{1,27})?$

cumulative_start_date

string

date-time

Date when the cumulative time-weighted returns calculation starts.

daily

string

^-?[0-9]{0,63}(\.[0-9]{1,27})?$

type

string

required

Event type

Default
"ACCOUNT_RETURNS.CREATED"
Enum
  • ACCOUNT_RETURNS.CREATED

webhook_id

string

uuid

required

Webhook unique identifier.

Request

{
  "created_at": "2023-09-02T05:15:00Z",
  "id": "399dc0a7-f4cb-42a4-9513-496df030381e",
  "object": {
    "account_id": "bbe9e784-e009-4cb6-a07c-24831897327b",
    "date": "2023-09-01T00:00:00Z",
    "twr": {
      "cumulative": "0.0324353234",
      "cumulative_start_date": "2023-08-01T00:00:00Z",
      "daily": "0.0132434142"
    }
  },
  "type": "ACCOUNT_RETURNS.CREATED",
  "webhook_id": "435719ac-c064-4c7a-a8b9-6db9446965de"
}

Response

Examples Schema

Request has been processed successfully.

Empty response

No schema

Was this page helpful?