Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion _countries.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Returns an array of payment objects containing two fields:
Property | Description
---------- | --------------------------------------------------------------------------------------------------------
currency | The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency supported for this payment method in this country.
method | The type of payment method. One of "[ach](https://en.wikipedia.org/wiki/ACH_Network)", "[card](https://en.wikipedia.org/wiki/Credit_card)", or "[sepa](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area)".
method | The type of payment method, such as "[ach](https://en.wikipedia.org/wiki/ACH_Network)", "[card](https://en.wikipedia.org/wiki/Credit_card)", or "[sepa](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area)". Alternative payment methods can also appear, such as "apple-pay", "google-pay", "interac", "paypal", "pix", "spei", or "venmo".

<aside class="notice">
Each method+currency pair is represented as a separate entry in this list. For example, if both <code>USD</code> and <code>EUR</code> are supported for the <code>card</code> method, the list will contain two entries, one with the <code>USD</code>-<code>card</code> pair, and one with the <code>EUR</code>-<code>card</code> pair.
Expand Down Expand Up @@ -184,4 +184,5 @@ curl https://api.uphold.com/v0/countries/BA/subdivisions
```

Returns an array of subdivision objects, containing the official name and the corresponding [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) code.
Subdivisions that are blocked due to [Uphold's regulatory compliance rules](https://support.uphold.com/hc/en-us/articles/202022209-Supported-Geographies) are excluded from the response.
If the country contains no subdivisions, an empty array is returned.
21 changes: 16 additions & 5 deletions _currencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,32 @@ curl https://api.uphold.com/v0/assets
[
{
"code": "BTC",
"features": ["buy", "deposit", "sell", "transfer", "withdraw"],
"formatting": {
"decimal": ".",
"format": "__symbol__ __value__ __code__",
"grouping": ",",
"precision": 8
},
"image": "https://cdn.uphold.com/assets/BTC.svg",
"name": "Bitcoin",
"shortName": "BTC",
"status": "open",
"symbol": "₿",
"type": "cryptocurrency"
},
{
"code": "USD",
"features": ["buy", "deposit", "sell", "transfer", "withdraw"],
"formatting": {
"decimal": ".",
"format": "__symbol__ __value__ __code__",
"grouping": ",",
"precision": 2
},
"image": "https://cdn.uphold.com/assets/USD.svg",
"name": "US Dollar",
"shortName": "USD",
"status": "open",
"symbol": "$",
"type": "fiat"
Expand Down Expand Up @@ -97,17 +103,20 @@ Get the list of supported currencies and other financial assets, with details as

Property | Description
---------- | --------------------------------------------------------------------------------------------------------
code | Uppercase abbreviation of the asset, e.g. "BTC", USD", "C", or "BRK.B".
code | Uppercase abbreviation of the asset, e.g. "BTC", "USD", or "BRK.B".
features | List of the operations currently enabled for the asset, e.g. `buy`, `deposit`, `sell`, `transfer`, and `withdraw`.
formatting | Specification for user-facing display, including number formatting and placement of the code and symbol.
image | URL of an image representing the asset, e.g. its logo.
name | Full name of the asset, e.g. "Euro", "Basic Attention Token", or "0x".
shortName | A shorter or alternative name for the asset, often the same as the code.
status | Current trading status. See [below](#asset-status) for more details.
symbol | A short and well-known representation of the asset, if one exists — e.g. "$", "₿", or "Kč".
type | Type of asset. Possible values are `commodity`, `cryptocurrency`, `equity`, `fiat`, `stablecoin` and `utility_token`.

If the request is unauthenticated, the full list of assets supported by Uphold is returned.
Authenticated requests, on the other hand, will filter the output,
returning only the assets available for the current user,
which can depend on factors such as their country and state of residency.
If the request is unauthenticated, the list of publicly available assets is returned.
Authenticated requests, on the other hand, will adjust the output,
returning the assets available for the current user — which may include additional, non-public assets —
depending on factors such as their country and state of residency.

The list of assets returned can also be filtered by `type` using a query string parameter,
as shown in the example to the side.
Expand All @@ -132,3 +141,5 @@ The possible values are:
Most assets remain in this status save for exceptional circumstances, where they can become `halted`.
Equities, on the other hand, will regularly transition between `open` and either `closed` or `extended`,
depending on their availability for 24/7 operation.
* `unavailable` — the asset cannot currently be transacted.
This is also the fallback value, used when no status information is known for the asset.
27 changes: 25 additions & 2 deletions _tickers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
At any time, you can query the rates we utilize when exchanging one form of value for another.
These are expressed in [currency pairs](#currency-pair-object).

Currency pairs are represented in two formats, both in the `pair` field of ticker responses and in the pair-based request paths below.
Pairs between two of the currencies supported early in Uphold's history (such as BTC, ETH, EUR, or USD) are represented in concatenated form, e.g. `BTCUSD`, while all other pairs are hyphenated, e.g. `SOL-USD`.

## Get Tickers for Currency

```bash
Expand Down Expand Up @@ -192,6 +195,12 @@ curl https://api.uphold.com/v0/ticker/USD
"currency": "USD",
"pair": "SGDUSD"
},
{
"ask": "165.62",
"bid": "165.44",
"currency": "USD",
"pair": "SOL-USD"
},
{
"ask": "3.67302",
"bid": "3.67302",
Expand Down Expand Up @@ -372,6 +381,12 @@ curl https://api.uphold.com/v0/ticker/USD
"currency": "SGD",
"pair": "USDSGD"
},
{
"ask": "0.00604",
"bid": "0.00603",
"currency": "SOL",
"pair": "USD-SOL"
},
{
"ask": "7.20046083",
"bid": "7.18752246",
Expand Down Expand Up @@ -452,10 +467,18 @@ Lists all exchange rates relative to a given currency.

`GET https://api.uphold.com/v0/ticker/:currency`

`GET https://api.uphold.com/v0/ticker`

If no currency is specified on the endpoint — i.e. the bare `GET /v0/ticker` route — USD is used as the base currency.

### Response

Returns an associative array containing the current rates Uphold has on record for the currency specified.
If no currency is specified on the endpoint, USD currency pair will be returned by default.
Returns a JSON array of objects containing the current rates Uphold has on record for the currency specified.

The results depend on authentication:
unauthenticated requests return rates for publicly available currencies only,
while authenticated requests may also include rates for additional currencies available to the current user.
Requesting a non-public currency without authentication results in a 404 error.

## Get Tickers for Currency Pair

Expand Down
51 changes: 24 additions & 27 deletions _transparency.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,24 @@ Frequently one may find that changes to the Reserve's assets and liabilities are
### Request

```bash
curl https://api.uphold.com/v0/reserve/ledger
curl https://api.uphold.com/v0/reserve/ledger \
-H "Authorization: Bearer <token>"
```

`GET https://api.uphold.com/v0/reserve/ledger`

This endpoint supports [Pagination](#pagination).

To access this endpoint, an API key is required.
To access this endpoint, an OAuth access token with the `reserve:read` scope is required,
issued to an application using the `authorization_code` grant.

### Deposits

The following entry shows how a deposit of 0.5 bitcoin by a user would be encoded on the Reserveledger.
Every deposit results in two entries in the ledger.
The first records the acquisition of a liability, and the second the genesis of an asset.
Specifically, it shows the creation of 0.5 bitcoin as an obligation to the user, plus the acquisition of 0.5 bitcoin as an asset.
Since a deposit only adds value to the Reserve, each entry contains only the `in` side.

<pre class="inline"><code>{
"TransactionId": "e205b50e-6649-416d-82c1-98f0ba44dcd9",
Expand All @@ -41,10 +44,6 @@ Specifically, it shows the creation of 0.5 bitcoin as an obligation to the user,
"amount": "0.5",
"currency": "BTC"
},
"out": {
"amount": "0.00",
"currency": "BTC"
},
"type": "liability"
},
{
Expand All @@ -53,10 +52,6 @@ Specifically, it shows the creation of 0.5 bitcoin as an obligation to the user,
"amount": "0.5",
"currency": "BTC"
},
"out": {
"amount": "0.00",
"currency": "BTC"
},
"type": "asset"
}
</code></pre>
Expand All @@ -71,7 +66,7 @@ Instead, Uphold owes them the $507.51 they exchanged for that bitcoin.

<pre class="inline"><code>{
"TransactionId": "1571fbef-d34e-447c-9b6e-4ad775953082",
"createdAt": "2014-09-30T20:29:36.575Z"
"createdAt": "2014-09-30T20:29:36.575Z",
"in": {
"amount": "507.51",
"currency": "USD"
Expand Down Expand Up @@ -104,7 +99,7 @@ This would therefore be recorded in our ledger at some point in the future as fo
}
</code></pre>

The examples above are nearly identical from one another due to the simplicity of the use case it elucidates.
The examples above are nearly identical to one another due to the simplicity of the use case it elucidates.
Consider however that when operating normally it is likely that a series of changes to our liabilities will be aggregated and accounted for in a single change to our assets in order to restore balance to the reserve.

### Withdrawal of Bitcoin
Expand All @@ -113,13 +108,10 @@ When value is removed from the Reserve, two entries are added.
One accounting for the change in assets, and the other for the change in liabilities.
The following entry shows how a user transmitting some bitcoin to an external network/wallet would be encoded on the ledger.
It shows the removal of a liability of bitcoin to the user, and the subsequent removal of bitcoin as an asset.
Since a withdrawal only removes value from the Reserve, each entry contains only the `out` side.

<pre class="inline"><code>{
"createdAt": "2014-10-08T06:53:51.080Z",
"in": {
"amount": "0.00",
"currency": "BTC"
},
"out": {
"amount": "0.10359178",
"currency": "BTC"
Expand All @@ -129,10 +121,6 @@ It shows the removal of a liability of bitcoin to the user, and the subsequent r
{
"TransactionId": "6ab1f3e8-3b84-40b0-aec7-8008117c9f86",
"createdAt": "2014-10-08T06:53:51.080Z",
"in": {
"amount": "0.00",
"currency": "BTC"
},
"out": {
"amount": "0.10359178",
"currency": "BTC"
Expand All @@ -150,10 +138,10 @@ What follows is how we could encode shifting 1M dollars into a US Treasury Bill.
Take note that we can optionally include additional data relating to the asset class.

<pre class="inline"><code>{
"createdAt": "2014-10-08T06:53:51.080Z"
"createdAt": "2014-10-08T06:53:51.080Z",
"in": {
"amount": "1",
"currency": "T-Bill"
"currency": "T-Bill",
"meta": {
"cusip": 345370860,
"maturityDate": "2016-05-01 00:00:00 UTC",
Expand All @@ -162,21 +150,21 @@ Take note that we can optionally include additional data relating to the asset c
}
},
"out": {
amount: "1000000",
currency: "USD"
"amount": "1000000",
"currency": "USD"
},
"type": "asset"
}
</code></pre>

<aside class="notice">
For the time being this "reallocation" example is merely theoretical, but speaks to the potential for us to records assets of various types.
For the time being this "reallocation" example is merely theoretical, but speaks to the potential for us to record assets of various types.
</aside>

## The Reservechain

Uphold's Reservechain is a record of all of the transactions made by its Members that move value through the network.
It is a "chain" in that any value moved in a transaction can be easily traced back to it's origin.
It is a "chain" in that any value moved in a transaction can be easily traced back to its origin.

At a high level, each transaction in the Reservechain contains the following key pieces of information:

Expand Down Expand Up @@ -210,7 +198,7 @@ Given that this is a point in the chain at which there is a genesis of value, th
However, we will provide a link to the external authority documenting the source of the value whenever possible.

<pre class="inline"><code>{
"createdAt": "2014-10-08T12:26:29.807Z"
"createdAt": "2014-10-08T12:26:29.807Z",
"denomination": {
"amount": "0.5",
"currency": "BTC"
Expand Down Expand Up @@ -297,6 +285,7 @@ Withdrawals also account for value leaving the Reservechain, and is thus a termi
A transfer documents movement of value within our network, either between two parties or two denominations, or both.

<pre class="inline"><code>{
"application": null,
"createdAt": "2014-09-30T20:29:36.458Z",
"denomination": {
"amount": "1.3",
Expand All @@ -310,6 +299,13 @@ A transfer documents movement of value within our network, either between two pa
"fee": "0.00",
"rate": "392.16000"
},
"fees": [{
"amount": "2.30",
"currency": "USD",
"percentage": "0.45",
"target": "destination",
"type": "exchange"
}],
"id": "1571fbef-d34e-447c-9b6e-4ad775953082",
"origin": {
"amount": "1.3001",
Expand All @@ -333,6 +329,7 @@ A transfer documents movement of value within our network, either between two pa
"rate": "392.16000",
"txid": "1946783b396998f8f91c984431ecfecff6d0a72db68b32d0873c1024c7279254"
},
"priority": "normal",
"status": "completed",
"type": "transfer"
}
Expand Down