# Getting Started

How to get started with the Vaultoro API.

## Getting Your Awesome Vaultoro API Running

Becoming awesome is fairly straight forward process. First you'll need to sign up for a Vaultoro account over on vaultoro.com. That'll take about 20 seconds.

When you're logged in, head over to the settings and create yourself an API token. Make a copy of said token since we'll not be giving that one out again.

You need to append this token to your headers, as so. If you happen to be using curl.

```
$ curl -H "VTOKEN: $TOKEN" -H 'Content-type: application/json' https://api.vaultoro.com/v1/me
```

{% hint style="info" %}
&#x20;Some endpoints are protected and cannot be accessed with your new API tokens.&#x20;
{% endhint %}

If you've done that all right, you should get a response like this.

{% code title="" %}

```bash
{
    "data": {
        "countryHandle": "DE",
        "createdAt": 1594306991,
        "defaults": {
            "currency": "EURCENT",
            "pair": "GOLDBTC"
        },
        "email": "simon@awesome.com",
        "flags": {
            "optInNewsletter": true,
            "verified": true
        },
        "identity": {
            "address": "1 Long Road",
            "city": "Somewhere",
            "firstName": "Simon",
            "lastName": "Awesome",
            "zipCode": "90210"
        },
        "languageHandle": "EN"
    }
}

```

{% endcode %}

You should make sure all requests have the `application/json` header too.

## Rate Limiting

All calls are rate limited. If you exceed the limits, you will receive a 429 response and an error message. These are subject to change, please contact support if you have any specific questions.

**Requests Using the VTOKEN**

100,000 requests per day. Once you've gone over this limit, you will need to wait 24 hours before you can access the API again.&#x20;

If you flood the API with failed requests using your VTOKEN, you will be throttled for 10 minutes. There's a limit of 100 failed requests in a three hour period.

**Requests using public endpoints**

10,000 requests per day. You will be blocked for 24 hours if you exceed this limit.

### What Next?

Go ahead and learn how to create an order, fetch your history and all that fun stuff.


# Example API Calls

A few API calls to get you started. The following examples all use cURL.

## Getting Your Balance

How to fetch your available and pending balance.

```
$ curl 'https://api.vaultoro.com/v1/private/balances' \
  -H 'VTOKEN: {TOKEN}'
```

The response will look a bit like this. Your pending balances represent orders you currently have places. To calculate your available balance, simply subtract your pending balance from your settled balance.

```
{
	"data": [{
		"type": "PENDING",
		"handle": "BTC",
		"quantity": "0.00000000"
	}, {
		"type": "SETTLED",
		"handle": "BTC",
		"quantity": "9998.04231521"
	}, {
		"type": "PENDING",
		"handle": "GOLD",
		"quantity": "17.0439"
	}, {
		"type": "SETTLED",
		"handle": "GOLD",
		"quantity": "100007.0439"
	}, {
		"type": "PENDING",
		"handle": "DASH",
		"quantity": "0.00000000"
	}, {
		"type": "SETTLED",
		"handle": "DASH",
		"quantity": "23.97600000"
	}, {
		"type": "PENDING",
		"handle": "SILVER",
		"quantity": "0"
	}, {
		"type": "SETTLED",
		"handle": "SILVER",
		"quantity": "50000"
	}]
}
```

## Creating an Order

The following will create a BUY order for 5 grams of Gold at 0.00050445 BTC.

```
curl -XPOST https://api.vaultoro.com/v1/private/orders \
-H "VTOKEN: $VTOKEN" \
-H 'Content-type: application/json' \
-d '{"pair": "GOLDBTC", "type": "BUY", "quantity": 5, "price": 0.00050445, "matchType": "LIMIT" }'
```

If successful, your response will look like this.

```
{
	"data": {
		"result": {
			"referenceId": "4kehxgp1keba8x4f",
			"createdAt": 1598440574
		}
	}
}
```

To **cancel** this order, use the referenceId returned.

```
curl -XDELETE https://api.vaultoro.com/v1/private/orders/4kehxgp1keba8x4f  \
-H "VTOKEN: $VTOKEN" \
-H 'Content-type: application/json'
```

If successful, you will receive the following response.

```
{
	"data": {
		"cancelled": true
	}
}
```


# Reset email

## Reset email

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/public/resetEmail`

This endpoint allows to reset user's email using the token sent with email.

#### Request Body

| Name  | Type   | Description                        |
| ----- | ------ | ---------------------------------- |
| token | string | Confirmation token sent with email |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{    "name": "Cake's name",    "recipe": "Cake's recipe name",    "cake": "Binary cake"}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}


# OHLC

Returns the latest OHLC data.

## Get OHLC

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/public/ohlc`

This endpoint allows you to get OHLC data. If you don't send the since parameter in the query, it will return the OHLC data for the last 24 hours.

#### Query Parameters

| Name  | Type   | Description                                 |
| ----- | ------ | ------------------------------------------- |
| since | number | Unix timestamp to filter the results since. |
| pair  | string | Allowed pair to filter results by.          |

{% tabs %}
{% tab title="200 OHLC data successfully retrieved." %}

```
{
    "data": [
        {
            "close": "0.00615450",
            "createdAt": 1595355655,
            "high": "2.00000000",
            "low": "0.00615450",
            "open": "0.00615450",
            "pair": "GOLDBTC",
            "volume": 47
        },
        {
            "close": "0.00615450",
            "createdAt": 1595355636,
            "high": "0.00615450",
            "low": "0.00615450",
            "open": "0.00615450",
            "pair": "GOLDBTC",
            "volume": 5
        },
        {
            "close": "0.00615450",
            "createdAt": 1595355528,
            "high": "0.00615450",
            "low": "0.00615450",
            "open": "0.00615450",
            "pair": "GOLDBTC",
            "volume": 5
        },
        {
            "close": "0.00615450",
            "createdAt": 1595355111,
            "high": "0.00615450",
            "low": "0.00615450",
            "open": "0.00615450",
            "pair": "GOLDBTC",
            "volume": 5
        },
        {
            "close": "0.00615450",
            "createdAt": 1595355010,
            "high": "0.00615450",
            "low": "0.00615450",
            "open": "0.00615450",
            "pair": "GOLDBTC",
            "volume": 5
        },
        {
            "close": "0.00615450",
            "createdAt": 1595180916,
            "high": "0.00615450",
            "low": "0.00615450",
            "open": "0.00615450",
            "pair": "GOLDBTC",
            "volume": 5659
        },
        {
            "close": "0.00615450",
            "createdAt": 1594844392,
            "high": "0.00615450",
            "low": "0.00615450",
            "open": "0.00615450",
            "pair": "GOLDBTC",
            "volume": 57
        },
        {
            "close": "0.00615450",
            "createdAt": 1594757057,
            "high": "0.00615450",
            "low": "0.00615450",
            "open": "0.00615450",
            "pair": "GOLDBTC",
            "volume": 18
        }
    ],
    "pagination": {
        "count": 8
    }
}
```

{% endtab %}
{% endtabs %}


# Orders

Fetch the orders

## Get Orders

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/public/orders`

This endpoint returns all the orders.

#### Query Parameters

| Name          | Type   | Description                                                            |
| ------------- | ------ | ---------------------------------------------------------------------- |
| until         | string | Unix timestamp to filter the results until.                            |
| since         | string | Unix timestamp to filter the results since.                            |
| sortDirection | string | Sort direction for the results. 1 for ascending and -1 for descending. |
| sort          | string | Sort the results by timestamp. Should be createdAt or updatedAt.       |
| limit         | number | Limit the number of results.                                           |
| page          | number | Return a specific page.                                                |
| type          | string | The type of order. Should be BUY or SELL.                              |
| status        | string | The status of the order. Can only be OPEN for the public endpoint.     |
| pair          | string | Filter by available pairs.                                             |
| matchType     | string | Filter the type of order. Currently only LIMIT.                        |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "data": [
        {
            "createdAt": 1595357756,
            "initialQuantity": 1223,
            "matchType": "LIMIT",
            "pair": "GOLDBTC",
            "quantity": "1198.0000",
            "status": "OPEN",
            "type": "BUY",
            "updatedAt": 1595427428,
            "value": "0.00615450"
        }
    ],
    "pagination": {
        "count": 1
    }
}
```

{% endtab %}
{% endtabs %}

## Get Liquidity

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/public/orders/liquidity`

Returns the current liquidity for a market. Will return FX data if you send in a currency handle.

#### Query Parameters

| Name      | Type   | Description                                                                    |
| --------- | ------ | ------------------------------------------------------------------------------ |
| until     | string | Unix timestamp to filter the results until.                                    |
| since     | string | Unix timestamp to filter the results since.                                    |
| type      | string | The type of order. Should be BUY or SELL.                                      |
| matchType | string | Filter the type of order. Currently only LIMIT.                                |
| fx        | string | Returns the FX data with the request. Must be EURCENT or CENT.                 |
| pair      | string | Enter the pair to filter by. Currently available: DASHBTC, GOLDBTC or GOLDDASH |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": [
        {
            "count": 1,
            "currencyHandle": "EURCENT",
            "currencyValue": "6122",
            "matchType": "LIMIT",
            "pair": "GOLDBTC",
            "price": "0.00061545",
            "quantity": "12.0000",
            "sum": "12.0000",
            "total": "0.0074",
            "type": "BUY"
        },
        {
            "count": 1,
            "currencyHandle": "EURCENT",
            "currencyValue": "5127",
            "matchType": "LIMIT",
            "pair": "GOLDBTC",
            "price": "0.00051545",
            "quantity": "12.0000",
            "sum": "24.0000",
            "total": "0.0062",
            "type": "BUY"
        },
        {
            "count": 1,
            "currencyHandle": "EURCENT",
            "currencyValue": "52370",
            "matchType": "LIMIT",
            "pair": "GOLDBTC",
            "price": "0.00050545",
            "quantity": "125.0000",
            "sum": "149.0000",
            "total": "0.0632",
            "type": "BUY"
        },
        {
            "count": 1,
            "currencyHandle": "EURCENT",
            "currencyValue": "52267",
            "matchType": "LIMIT",
            "pair": "GOLDBTC",
            "price": "0.00050445",
            "quantity": "125.0000",
            "sum": "274.0000",
            "total": "0.0631",
            "type": "BUY"
        },
        {
            "count": 1,
            "currencyHandle": "EURCENT",
            "currencyValue": "5029",
            "matchType": "LIMIT",
            "pair": "GOLDBTC",
            "price": "0.00040445",
            "quantity": "15.0000",
            "sum": "289.0000",
            "total": "0.0061",
            "type": "BUY"
        }
    ]
}

```

{% endtab %}
{% endtabs %}


# Ticker

Fetch the latest market prices for Gold Bitcoin, Gold Dash and more.

## Get Market Price

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/public/ticker`

This endpoint displays the current spot price for the selected pair. Currently we support the following pairs:\
\
\- GOLDBTC\
\- GOLDDASH\
\- GOLDETH\
\- GOLDSILV\
\- DASHBTC\
\- EUROBTC\
\- EURODASH\
\- EUROETH\
\- SILVBTC\
\- SILVDASH\
\- SILVETH<br>

#### Query Parameters

| Name | Type   | Description                                   |
| ---- | ------ | --------------------------------------------- |
| pair | string | Currently supported pairs can be found above. |

{% tabs %}
{% tab title="200 Ticker successfully retrieved." %}

```
{
    "data": {
        "ask": "0.00331589",
        "bid": "0.00315971",
        "handle": "GOLDBTC"
    }
}
```

{% endtab %}
{% endtabs %}


# Trades

Fetch a list of the most recent trades

## Get Trades

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/public/trades`

This endpoint allows you to get the latest trades.

#### Query Parameters

| Name  | Type   | Description                                                                    |
| ----- | ------ | ------------------------------------------------------------------------------ |
| page  | number | Filter the results by page                                                     |
| pair  | string | Enter the pair to filter by. Currently available: DASHBTC, GOLDBTC or GOLDDASH |
| until | number | Unix timestamp to filter the results until                                     |
| since | string | Unix timestamp to filter results since                                         |
| limit | number | Limit the number of results                                                    |

{% tabs %}
{% tab title="200 Trades successfully retrieved." %}

```
{
    "data": [
        {
            "createdAt": 1595427428,
            "matchType": "LIMIT",
            "pair": "GOLDBTC",
            "price": "0.00615450",
            "quantity": "1.0000",
            "type": "BUY",
            "updatedAt": 1595427428
        }
    ],
    "pagination": {
        "count": 1
    }
}

```

{% endtab %}

{% tab title="404 Could not find any matching trades for this query." %}

```
{
    "data": [],
    "pagination": {
        "count": 0
    }
}

```

{% endtab %}
{% endtabs %}


# Trading Fees

## Get Fees

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/public/fees`

This endpoint allows you to fetch the scheduled fees for all the pairs.

#### Query Parameters

| Name | Type   | Description                         |
| ---- | ------ | ----------------------------------- |
| pair | string | Optionally filter the fees by pair. |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": [
        {
            "pair": "GOLDBTC",
            "type": "MAKER",
            "percentage": "0.500",
            "bound": 5000
        },
        {
            "pair": "GOLDBTC",
            "type": "TAKER",
            "percentage": "0.500",
            "bound": 5000
        },
        {
            "pair": "GOLDDASH",
            "type": "MAKER",
            "percentage": "0.500",
            "bound": 5000
        },
        {
            "pair": "GOLDDASH",
            "type": "TAKER",
            "percentage": "0.500",
            "bound": 5000
        },
        {
            "pair": "GOLDETH",
            "type": "MAKER",
            "percentage": "0.500",
            "bound": 5000
        },
        {
            "pair": "GOLDETH",
            "type": "TAKER",
            "percentage": "0.500",
            "bound": 5000
        },
        {
            "pair": "GOLDDASH",
            "type": "TAKER",
            "percentage": "0.475",
            "bound": 25000
        },
        {
            "pair": "GOLDDASH",
            "type": "MAKER",
            "percentage": "0.450",
            "bound": 25000
        },
        {
            "pair": "GOLDBTC",
            "type": "TAKER",
            "percentage": "0.475",
            "bound": 25000
        },
        {
            "pair": "GOLDBTC",
            "type": "MAKER",
            "percentage": "0.450",
            "bound": 25000
        },
        {
            "pair": "GOLDETH",
            "type": "TAKER",
            "percentage": "0.475",
            "bound": 25000
        },
        {
            "pair": "GOLDETH",
            "type": "MAKER",
            "percentage": "0.450",
            "bound": 25000
        },
        {
            "pair": "GOLDBTC",
            "type": "TAKER",
            "percentage": "0.450",
            "bound": 100000
        },
        {
            "pair": "GOLDDASH",
            "type": "TAKER",
            "percentage": "0.450",
            "bound": 100000
        },
        {
            "pair": "GOLDDASH",
            "type": "MAKER",
            "percentage": "0.400",
            "bound": 100000
        },
        {
            "pair": "GOLDBTC",
            "type": "MAKER",
            "percentage": "0.400",
            "bound": 100000
        },
        {
            "pair": "GOLDETH",
            "type": "TAKER",
            "percentage": "0.450",
            "bound": 100000
        },
        {
            "pair": "GOLDETH",
            "type": "MAKER",
            "percentage": "0.400",
            "bound": 100000
        },
        {
            "pair": "GOLDBTC",
            "type": "MAKER",
            "percentage": "0.350",
            "bound": 1000000
        },
        {
            "pair": "GOLDDASH",
            "type": "TAKER",
            "percentage": "0.425",
            "bound": 1000000
        },
        {
            "pair": "GOLDDASH",
            "type": "MAKER",
            "percentage": "0.350",
            "bound": 1000000
        },
        {
            "pair": "GOLDBTC",
            "type": "TAKER",
            "percentage": "0.425",
            "bound": 1000000
        },
        {
            "pair": "SILVDASH",
            "type": "TAKER",
            "percentage": "0.425",
            "bound": 1000000
        },
        {
            "pair": "GOLDETH",
            "type": "MAKER",
            "percentage": "0.350",
            "bound": 1000000
        },
        {
            "pair": "GOLDETH",
            "type": "TAKER",
            "percentage": "0.425",
            "bound": 1000000
        },
        {
            "pair": "GOLDDASH",
            "type": "TAKER",
            "percentage": "0.400",
            "bound": 5000000
        },
        {
            "pair": "GOLDBTC",
            "type": "TAKER",
            "percentage": "0.400",
            "bound": 5000000
        },
        {
            "pair": "GOLDDASH",
            "type": "MAKER",
            "percentage": "0.000",
            "bound": 5000000
        },
        {
            "pair": "GOLDBTC",
            "type": "MAKER",
            "percentage": "0.000",
            "bound": 5000000
        },
        {
            "pair": "GOLDETH",
            "type": "TAKER",
            "percentage": "0.400",
            "bound": 5000000
        },
        {
            "pair": "GOLDETH",
            "type": "MAKER",
            "percentage": "0.000",
            "bound": 5000000
        },
        {
            "pair": "GOLDDASH",
            "type": "TAKER",
            "percentage": "0.375",
            "bound": 10000000000
        },
        {
            "pair": "DASHBTC",
            "type": "MAKER",
            "percentage": "-0.050",
            "bound": 10000000000
        },
        {
            "pair": "GOLDDASH",
            "type": "MAKER",
            "percentage": "-0.100",
            "bound": 10000000000
        },
        {
            "pair": "GOLDBTC",
            "type": "TAKER",
            "percentage": "0.375",
            "bound": 10000000000
        },
        {
            "pair": "GOLDETH",
            "type": "TAKER",
            "percentage": "0.375",
            "bound": 10000000000
        },
        {
            "pair": "DASHBTC",
            "type": "TAKER",
            "percentage": "0.100",
            "bound": 100000000000
        },
        {
            "pair": "GOLDBTC",
            "type": "MAKER",
            "percentage": "0.000",
            "bound": 5000000
        },
        {
            "pair": "GOLDETH",
            "type": "MAKER",
            "percentage": "0.000",
            "bound": 0.0005
        },
        {
            "pair": "GOLDBTC",
            "type": "MAKER",
            "percentage": "-0.100",
            "bound": 10000000000
        },
        {
            "pair": "GOLDETH",
            "type": "MAKER",
            "percentage": "-0.100",
            "bound": 1
        }
    ]
}
```

{% endtab %}
{% endtabs %}


# Audit

This is a daily snapshot representation of client balances.

## Glass Book

<mark style="color:blue;">`GET`</mark> `https//api.vaultoro.com/v1/public/glassbooks`

#### Query Parameters

| Name  | Type   | Description                      |
| ----- | ------ | -------------------------------- |
| q     | string | Client ID for filtering results. |
| page  | number | Filter results by page.          |
| limit | number | Limit number of results.         |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}


# Ledger

These endpoints allow you to get the ledger data.

## Get Ledger

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/ledger`

#### Query Parameters

| Name   | Type   | Description                                    |
| ------ | ------ | ---------------------------------------------- |
| handle | string | Filter results by a handle, BTC, DASH or GOLD. |
| limit  | number | Limit the number of results.                   |
| page   | number | Return a specific page.                        |
| since  | string | Unix timestamp to filter the results since.    |
| until  | string | Unix timestamp to filter the results until.    |

#### Headers

| Name   | Type   | Description     |
| ------ | ------ | --------------- |
| VTOKEN | string | Your API Token. |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": [
        {
            "foreignID": "fad6k2jdkgi5aqfi",
            "referenceId": "LULfmV77Wgw88z6yjiAHzC",
            "typeHandle": "TRANSFER",
            "sourceReferenceId": "uJuLUhsAoAQdicbzrcDfud",
            "handle": "BTC",
            "value": "1.00000000",
            "runningTotal": "4.00000000",
            "createdAt": 1615820879
        },
        {
            "foreignID": "fad6k2jdkgi5aqfi",
            "referenceId": "MtPBTvs6Q3akuwNwBTopY7",
            "typeHandle": "TRANSFER",
            "sourceReferenceId": "bLNR5iSftz6RRCSATTaE4c",
            "handle": "BTC",
            "value": "1.00000000",
            "runningTotal": "3.00000000",
            "createdAt": 1615820854
        },
        {
            "foreignID": "fad6k2jdkgi5aqfi",
            "referenceId": "e7YF5UYNKhnXVRdFCQ9ZJB",
            "typeHandle": "TRANSFER",
            "sourceReferenceId": "KBDgpNXqYiWvg4PBZKM3fn",
            "handle": "BTC",
            "value": "1.00000000",
            "runningTotal": "2.00000000",
            "createdAt": 1615820734
        },
        {
            "foreignID": "fad6k2jdkgi5aqfi",
            "referenceId": "vAP3uKkQdfQQD4zS5UdK8F",
            "typeHandle": "TRANSFER",
            "sourceReferenceId": "ojPx9AhVk6asECGvT6PPem",
            "handle": "BTC",
            "value": "1.00000000",
            "runningTotal": "1.00000000",
            "createdAt": 1615820653
        }
    ],
    "pagination": {
        "limit": 50,
        "page": 1,
        "count": 4
    }
}
```

{% endtab %}
{% endtabs %}

## Get Daily Ledger

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/ledger/daily`

#### Query Parameters

| Name   | Type   | Description                                    |
| ------ | ------ | ---------------------------------------------- |
| handle | string | Filter results by a handle, BTC, DASH or GOLD. |
| since  | string | Unix timestamp to filter the results since.    |

#### Headers

| Name   | Type   | Description     |
| ------ | ------ | --------------- |
| VTOKEN | string | Your API Token. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}


# Assets

These endpoints allow you to to generate wallet addresses for your assets, deposit funds and also withdraw funds from your account.

## Get Wallet Address

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/coins/address`

This endpoint allows you to retrieve your wallet addresses.

#### Query Parameters

| Name  | Type    | Description                                              |
| ----- | ------- | -------------------------------------------------------- |
| asset | string  | The asset you want to retrieve the wallet addresses for. |
| old   | boolean | Choose to return inactive wallet addresses.              |

#### Headers

| Name   | Type   | Description     |
| ------ | ------ | --------------- |
| VTOKEN | string | Your API token. |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": [
        {
            "asset": "BTC",
            "createdAt": 1598457942,
            "quantity": "0.00100000",
            "reference": "d281466425a9a1ceabb68d2da5b9dc1dc2ab185",
            "referenceId": "gbam4yhkebkllec",
            "status": "PENDING",
            "txData": {
                "confirmations": 0,
                "timeReceived": 1598457942,
                "txId": "d2814664259b68d2da5b9dc1dc2ab185"
            },
            "type": "RECEIVE",
            "updatedAt": 1598457962
        }
    ],
    "pagination": {
        "count": 1,
        "page": 1
    }
}
```

{% endtab %}
{% endtabs %}

## Create Wallet Address

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/private/coins/address`

This endpoint allows you create wallet addresses. You can create one address every 12 hours.

#### Query Parameters

| Name  | Type   | Description                                               |
| ----- | ------ | --------------------------------------------------------- |
| asset | string | The asset you want to create an address for. BTC or DASH. |

#### Headers

| Name   | Type   | Description     |
| ------ | ------ | --------------- |
| VTOKEN | string | Your API token. |

{% tabs %}
{% tab title="200 Address successfully created." %}

```
{
    "data": {
        "address": "xxx-xxx-xxx"
    }
}

```

{% endtab %}
{% endtabs %}

## Withdraw funds from your account

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/private/coins/withdraw`

This endpoint requires OTP to be enabled on your account. You must send your OTP with your request. Your account must also be validated.\
\
You can request one withdrawal each 5 minutes. Fees also apply to each transaction - please login to your account to view the current ones.

#### Query Parameters

| Name     | Type   | Description                                          |
| -------- | ------ | ---------------------------------------------------- |
| asset    | string | The asset you wish to withdraw funds in. BTC or DASH |
| otp      | string | Your One Time Password from Authenticator App.       |
| address  | string | The address to which you want to withdraw funds to.  |
| quantity | number | The amount you wish to withdraw.                     |

#### Headers

| Name   | Type   | Description    |
| ------ | ------ | -------------- |
| VTOKEN | string | Your API Token |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": {
        "asset": "BTC",
        "createdAt": 1596531605,
        "fee": 0.0005,
        "message": "Withdrawal queued",
        "quantity": "0.055"
    }
}

```

{% endtab %}
{% endtabs %}

## Withdrawal Fees

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/private/coins/withdraw/fees`

Calculate the fees for an asset withdrawal.

#### Query Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| asset    | string | The asset you wish to filter results by         |
| quantity | number | The quantity of the asset you wish to withdraw. |

#### Headers

| Name   | Type   | Description     |
| ------ | ------ | --------------- |
| VTOKEN | string | Your API token. |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": {
        "fee": "0.000500000000000000",
        "gross": "1.000000000000000000",
        "min": "0.005000000000000000",
        "net": "0.999500000000000000"
    }
}

```

{% endtab %}
{% endtabs %}

## Retrieve Transactions

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/coins/transactions`

Fetch the status of your recent transactions.

#### Query Parameters

| Name   | Type    | Description                                                                               |
| ------ | ------- | ----------------------------------------------------------------------------------------- |
| type   | string  | Either SEND or RECEIVE to filter by deposits or withdrawals.                              |
| status | string  | Query by PENDING or VALID transactions.                                                   |
| tx     | boolean | Send in true and we'll return the status of the transaction on the associated blockchain. |
| limit  | number  | The number of results to return                                                           |
| asset  | string  | The asset you want to filter the transactions by.                                         |

#### Headers

| Name   | Type   | Description    |
| ------ | ------ | -------------- |
| VTOKEN | string | Your API Token |

{% tabs %}
{% tab title="200 Expected response without the status handle" %}

```
{
    "data": [
        {
            "asset": "BTC",
            "createdAt": 1597913751,
            "quantity": "0.00140000",
            "txId": "3268ce8360f5571ee",
            "referenceId": "xj5dzmn1ke2kqvwd",
            "status": "PENDING",
            "type": "RECEIVE",
            "updatedAt": 1597914013
        }
    ],
    "pagination": {
        "count": 1,
        "page": 1
    }
}

```

{% endtab %}
{% endtabs %}


# Balances

Your balances represent your available funds in all currencies.

## Get Balance

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/balances`

This endpoint allows you to get your balances.

#### Query Parameters

| Name | Type    | Description                                     |
| ---- | ------- | ----------------------------------------------- |
| fx   | boolean | Choose to return the FX data with your request. |

#### Headers

| Name   | Type   | Description                              |
| ------ | ------ | ---------------------------------------- |
| VTOKEN | string | Your API token to authenticate requests. |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "data": [
        {
            "currencyHandle": "EURCENT",
            "handle": "BTC",
            "quantity": "0.00000000",
            "total": 0,
            "type": "PENDING"
        },
        {
            "currencyHandle": "EURCENT",
            "handle": "BTC",
            "quantity": "10.00000000",
            "total": 8288900,
            "type": "SETTLED"
        },
        {
            "currencyHandle": "EURCENT",
            "handle": "GOLD",
            "quantity": "0.0000",
            "total": 0,
            "type": "PENDING"
        },
        {
            "currencyHandle": "EURCENT",
            "handle": "GOLD",
            "quantity": "100.0000",
            "total": 515055,
            "type": "SETTLED"
        },
        {
            "currencyHandle": "EURCENT",
            "handle": "DASH",
            "quantity": "0.00000000",
            "total": 0,
            "type": "PENDING"
        },
        {
            "currencyHandle": "EURCENT",
            "handle": "DASH",
            "quantity": "0.00000000",
            "total": 0,
            "type": "SETTLED"
        }
    ],
    "fxData": [
        {
            "currency": "EURCENT",
            "handle": "BTC",
            "value": "828890"
        },
        {
            "currency": "EURCENT",
            "handle": "GOLD",
            "value": "5151"
        },
        {
            "currency": "EURCENT",
            "handle": "DASH",
            "value": "6452"
        }
    ]
}
```

{% endtab %}
{% endtabs %}


# History


# Export

This endpoint lets you export your data to a CSV.

## Create CSV Export

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/private/history`

This endpoint allows you to export your history. You can export each type of data once per 10 minute interval. A link to download your results will be emailed to your account email address.

#### Query Parameters

| Name  | Type    | Description                                                                                          |
| ----- | ------- | ---------------------------------------------------------------------------------------------------- |
| pair  | string  | If you're exporting your orders, fees or trades, set this to GOLDBTC, GOLDDASH or DASHBTC.           |
| type  | string  | The type of data you want to export. This must be: transactions, trades, orders or fees.             |
| asset | boolean | If you're exporting your transactions, set this to the asset you wish to export. Either BTC or DASH. |

#### Headers

| Name   | Type   | Description                |
| ------ | ------ | -------------------------- |
| VTOKEN | string | Your authentication token. |

{% tabs %}
{% tab title="200 Job queued successfully." %}

```
{
    "data": {
        "message": "Export queued"
    }
}
```

{% endtab %}
{% endtabs %}


# Fees

The fees associated with your trades / orders.

## Get Trade Fees

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/history/fees`

This endpoint allows you to get the fees for your trades.

#### Query Parameters

| Name          | Type   | Description                                       |
| ------------- | ------ | ------------------------------------------------- |
| handle        | string | Filter results by a handle, BTC, DASH or GOLD     |
| sortDirection | string | The direction to sort the results, either 1 or -1 |
| sort          | string | Sort the results by createdAt or updatedAt        |
| until         | string | Unix timestamp to filter the results until        |
| since         | string | Unix timestamp to filter results since            |
| limit         | number | Limit the number of results.                      |
| page          | number | Return a specific page.                           |

#### Headers

| Name   | Type   | Description                              |
| ------ | ------ | ---------------------------------------- |
| VTOKEN | string | Your API token to authenticate requests. |

{% tabs %}
{% tab title="200 Fees successfully retrieved." %}

```
{
    "data": [
        {
            "createdAt": 1595428047,
            "handle": "GOLD",
            "referenceId": "1hik3av6xqkcxgnzqr",
            "status": "VALID",
            "type": "VOLUME30",
            "value": "0.00226276"
        }
    ],
    "pagination": {
        "count": 1
    }
}
```

{% endtab %}
{% endtabs %}


# Trades

Fetch your most recent trades

## Get Trades

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/history/trades`

This endpoint allows you to fetch all your trades.

#### Query Parameters

| Name    | Type   | Description                                                                     |
| ------- | ------ | ------------------------------------------------------------------------------- |
| type    | string | Filter by the SELL or BUY trades.                                               |
| orderId | string | Get all the trades associated with an order.                                    |
| limit   | string | Limit the number of results.                                                    |
| since   | number | Unix timestamp to filter results since.                                         |
| pair    | string | Enter the pair to filter by. Currently available: DASHBTC, GOLDBTC or GOLDDASH. |
| page    | number | Filter the results by page.                                                     |
| until   | number | Unix timestamp to filter the results until.                                     |

#### Headers

| Name   | Type   | Description                              |
| ------ | ------ | ---------------------------------------- |
| VTOKEN | string | Your API token to authenticate requests. |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "data": [
        {
            "createdAt": 1595427428,
            "fees": {
                "typeHandle": "VOLUME30",
                "value": "-0.01900000"
                "handle": "GOLD",
            },
            "matchType": "LIMIT",
            "orderReferenceId": "dczi1trxkcwatf0x",
            "pair": "GOLDBTC",
            "price": "0.00615450",
            "quantity": "1.0000",
            "referenceId": "1pxn6pkkcxgaq9o",
            "type": "BUY",
            "updatedAt": 1595427428
        }
    ],
    "pagination": {
        "count": 1
    }
}

```

{% endtab %}

{% tab title="404 Could not find any trades matching this query." %}

```
{
    "data": [],
    "pagination": {
        "count": 0
    }
}
```

{% endtab %}
{% endtabs %}


# Transactions

Displays the BTC, DASH and Gold transactions

## Get Transactions

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/history/transactions`

This endpoint lets you fetch your transaction history.

#### Query Parameters

| Name  | Type    | Description                                                 |
| ----- | ------- | ----------------------------------------------------------- |
| since | string  | Unix timestamp to filter the results since                  |
| until | string  | Unix timestamp to filter the results until                  |
| limit | string  | Limit the number of results.                                |
| page  | string  | The page number.                                            |
| asset | string  | The asset you wish to filter by. Must be BTC, GOLD or DASH. |
| type  | boolean | The type of transaction. Should be SEND or RECEIVE.         |

#### Headers

| Name   | Type   | Description                              |
| ------ | ------ | ---------------------------------------- |
| VTOKEN | string | Your API token to authenticate requests. |

{% tabs %}
{% tab title="200 Cake successfully transactions." %}

```
{
    "data": [
        {
            "asset": "GOLD",
            "createdAt": 1594911528,
            "referenceId": "g2p1x1aajkcox578x",
            "status": "VALID",
            "subject": "xxx",
            "transactionReference": "xxx",
            "type": "SEND",
            "value": "-50.00000000"
        },
        {
            "asset": "GOLD",
            "createdAt": 1594911463,
            "referenceId": "g2p1x1a8vkcox3tek",
            "status": "VALID",
            "subject": "xxx",
            "transactionReference": "xxx",
            "type": "SEND",
            "value": "-50.00000000"
        },
        {
            "asset": "GOLD",
            "createdAt": 1594911396,
            "referenceId": "g2p1x1a70kcox2dix",
            "status": "VALID",
            "subject": "xx",
            "transactionReference": "xxx",
            "type": "SEND",
            "value": "-25500.00000000"
        },
        {
            "asset": "GOLD",
            "createdAt": 1594911370,
            "referenceId": "g2p1x1a6nkcox1t8i",
            "status": "VALID",
            "subject": "xxx",
            "transactionReference": "xxx",
            "type": "SEND",
            "value": "-25500.00000000"
        }
    ],
    "pagination": {
        "count": 4
    }
}

```

{% endtab %}
{% endtabs %}


# Orders

Listing and creating your own order / trade.

## Get Orders

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/orders`

This endpoint allows you to retrieve orders. To fetch your own orders, just pass self=true with the request.

#### Query Parameters

| Name          | Type    | Description                                                                                               |
| ------------- | ------- | --------------------------------------------------------------------------------------------------------- |
| queued        | string  | Sets the status filter to OPEN and QUEUED.                                                                |
| status        | string  | The status of the order. This can be OPEN, CLOSED, FILLED, CANCELLED, or QUEUED for the private endpoint. |
| since         | string  | Unix timestamp to filter results until.                                                                   |
| until         | string  | Unix timestamp to filter results until.                                                                   |
| self          | boolean | Return a list of your own orders. Must be set to true.                                                    |
| sortDirection | number  | The direction of the sorting. Either 1 or -1.                                                             |
| sort          | string  | Sort the results by createdAt or updatedAt                                                                |
| matchType     | string  | Filter the type of order. Currently only LIMIT.                                                           |
| pair          | string  | Filter by available pairs.                                                                                |
| status        | string  | The status of the order. Should be OPEN, CLOSED, FILLED, CANCELLED.                                       |
| type          | string  | The type of order. Should be BUY or SELL.                                                                 |
| limit         | string  | Limit the number of results.                                                                              |
| page          | number  | Return a specific page.                                                                                   |

#### Headers

| Name   | Type   | Description                              |
| ------ | ------ | ---------------------------------------- |
| VTOKEN | string | Your API token to authenticate requests. |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "data": [
        {
            "createdAt": 1595357594,
            "initialQuantity": 12,
            "matchType": "LIMIT",
            "pair": "GOLDBTC",
            "quantity": "0.0000",
            "status": "FILLED",
            "type": "SELL",
            "updatedAt": 1595357766,
            "value": "0.00615450"
        },
        {
            "createdAt": 1595357730,
            "initialQuantity": 12,
            "matchType": "LIMIT",
            "pair": "GOLDBTC",
            "quantity": "0.0000",
            "status": "FILLED",
            "type": "SELL",
            "updatedAt": 1595358200,
            "value": "0.00615450"
        }
    ]
}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{
    "data": []
}
```

{% endtab %}
{% endtabs %}

## Create Order

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/private/orders`

The endpoint allows you to create an order. After creation, your order will be placed in a queue and further checks run. Only one order can be made at a time.

#### Headers

| Name           | Type   | Description                                                                              |
| -------------- | ------ | ---------------------------------------------------------------------------------------- |
| wallet-origin  | string |                                                                                          |
| Authentication | string | Authentication token.                                                                    |
| VTOKEN         | string | Use an API token to authorise the requests instead of the standard authentication token. |

#### Request Body

| Name      | Type   | Description                                            |
| --------- | ------ | ------------------------------------------------------ |
| price     | number | The price of the order you wish to make.               |
| type      | string | The type of order, BUY or SELL.                        |
| quantity  | number | The quantity you wish you purchase.                    |
| matchType | string | The match type, must be set to LIMIT or OTC right now. |
| pair      | string | The pair you wish to trade.                            |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": {
        "result": {
            "referenceId": "1nod461th2kpqzsr56",
            "createdAt": 1623335089,
            "matchType": "LIMIT",
            "price": "0.2121",
            "quantity": "0.5",
            "type": "SELL"
        }
    }
}
```

{% endtab %}
{% endtabs %}

## Cancel an order

<mark style="color:red;">`DELETE`</mark> `https://api.vaultoro.com/v1/private/orders/{referenceId}`

Cancel an order that's currently processing.&#x20;

#### Path Parameters

| Name        | Type   | Description                                             |
| ----------- | ------ | ------------------------------------------------------- |
| referenceId | string | The referenceId for the order that's returned on create |

#### Headers

| Name   | Type   | Description     |
| ------ | ------ | --------------- |
| VTOKEN | string | Your API Token. |

{% tabs %}
{% tab title="200 " %}

```
{"data":{"cancelled":true}}
```

{% endtab %}
{% endtabs %}

## Get an Order

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/orders/{referenceId}`

The endpoint allows you to retrieve a single order using the referenceId.

#### Path Parameters

| Name        | Type   | Description                                             |
| ----------- | ------ | ------------------------------------------------------- |
| referenceId | string | The referenceId for the order that's returned on create |

#### Headers

| Name   | Type   | Description     |
| ------ | ------ | --------------- |
| VTOKEN | string | Your API token. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}


# OTC

Over the counter (OTC) purchases or Vaultoro Direct within the dashboard allow you to buy and sell assets quickly at market rates.

## Create Quote

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/private/orders/otc`

This OTC endpoint allows you to fetch a BUY/SELL quote for a pair before committing to the purchase. Your quote price will be valid for 30 seconds from the time of request.\
\
You can send in a quantity or total with your request. The quantity represents the amount of the baseHandle you wish to buy or sell. And the total is the total to spend. \
\
For example, you want to buy GOLD with BTC. Sending in quantity 1 - you're getting 1 gram of Gold for BTC. However, if you send in the total value, your quote will assume you want to spend 1 BTC. &#x20;

#### Query Parameters

| Name     | Type   | Description                                                                                                                                                                      |
| -------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| match    | string | 'spend' or 'receive'                                                                                                                                                             |
| quantity | string | The quantity field represents the amount of the asset you wish to buy. For more information, please refer to the details above. This field is required unless the total is sent. |
| pair     | string | The pair you wish to retrieve a quote for. Currently supported pairs include GOLDBTC and GOLDDASH.                                                                               |
| type     | string | The type of quote you require pricing for. Either BUY or SELL.                                                                                                                   |

#### Headers

| Name   | Type   | Description        |
| ------ | ------ | ------------------ |
| VTOKEN | string | Vaultoro API token |

{% tabs %}
{% tab title="200 Quote successfully retrieved." %}

```
{
    "data":{
				"pair":"GOLDBTC",
				"quantity":"0.5",
				"quoteID":"e9b2d55e-f8b9-422f-b391-fb9287d9b171",
	      "type":"BUY",
	      "match":"spend",
	      "ticker":"0.00139808",
	      "expires":1629986181
    }
}

```

{% endtab %}
{% endtabs %}

## Create OTC Order

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/private/orders/otc`

Call the same endpoint with the quoteID returned in the previous call to confirm the order. Without the quoteID, a new quote will be created.

#### Headers

| Name   | Type   | Description        |
| ------ | ------ | ------------------ |
| VTOKEN | string | Vaultoro API Token |

#### Request Body

| Name     | Type   | Description                                                                                        |
| -------- | ------ | -------------------------------------------------------------------------------------------------- |
| quoteID  | string | Enter a quoteID for a previously created quote.                                                    |
| type     | string | The type of quote, BUY or SELL.                                                                    |
| quantity | string | The quantity field represents the amount of asset you wish to buy.                                 |
| match    | string | 'spend' or 'receive'                                                                               |
| pair     | string | The pair you wish to retrieve a quote for. Currently supported pairs include GOLDBTC and GOLDDASH. |

{% tabs %}
{% tab title="200 OTC order successfully placed" %}

```
{
    "data": {
        "result": {
						"referenceId":"7452336d-3567-4e10-b482-a1cec04897dc",
						"createdAt":1629986429,
						"matchType":"OTC",
						"price":"0.00139737",
						"quantity":"5",
						"type":"BUY",
						"pair":"GOLD:BTC"
	      }
    }
}
```

{% endtab %}
{% endtabs %}


# Referrals

This returns information about your referrals.

## Get Referrals

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/referrals`

This endpoint allows you to fetch your referral ID and fee schedule.

#### Headers

| Name   | Type   | Description                              |
| ------ | ------ | ---------------------------------------- |
| VTOKEN | string | Your API token to authenticate requests. |

{% tabs %}
{% tab title="200 Referrals successfully retrieved." %}

```
{
    "data": {
        "code": "q8VGq2B",
        "createdAt": 1595582580,
        "fees": [
            {
                "percentage": "20.00",
                "type": "REFERRAL_DIRECT"
            },
            {
                "percentage": "5.00",
                "type": "REFERRAL_INDIRECT"
            }
        ],
        "referred": 0
    }
}
```

{% endtab %}
{% endtabs %}


# Tokens

API tokens let you access the Vaultoro services, create orders and more.

## Get Tokens

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/tokens`

This endpoint allows you to get your API tokens.

#### Headers

| Name          | Type   | Description             |
| ------------- | ------ | ----------------------- |
| Authorization | string | Your main bearer token. |

{% tabs %}
{% tab title="200 API tokens successfully retrieved." %}

```
{
    "data": [
        {
            "expires": 1654870020,
            "scopes": [
                "api"
            ],
            "createdAt": 1623334020,
            "referenceId": "20c96eaf-4e40-44ae-b697-650e0ae64d5e"
        }
    ]
}
```

{% endtab %}

{% tab title="404 Could not find any tokens." %}

```
{
    "data": []
}
```

{% endtab %}
{% endtabs %}

## Create Token

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/tokens`

Create API tokens for your account. Make a note of the token that is returned since you cannot access this again. \
\
**Currently you can only create tokens within the Vaultoro dashboard.**

#### Headers

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| Authorization | string | Your main bearer token |

#### Request Body

| Name    | Type   | Description                                               |
| ------- | ------ | --------------------------------------------------------- |
| expires | number | The unix epoch time at which the token expires.           |
| scope   | string | The scope in which the token works in, 'read' or 'write'. |
| captcha | string | The value of the captcha on the Vaultoro dashboard.       |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": {
        "expires": 1595535601,
        "referenceId": "fe22dc78-f266-4584-9071-95bbffd08429",
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
    }
}
```

{% endtab %}
{% endtabs %}

## Delete Token

<mark style="color:red;">`DELETE`</mark> `https://api.vaultoro.com/v1/tokens/:referenceId`

Delete any of your API tokens.

#### Path Parameters

| Name        | Type   | Description                                     |
| ----------- | ------ | ----------------------------------------------- |
| referenceId | string | The referenceId of the token you want to delete |

#### Headers

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| Authorization | string | Your main bearer token |

{% tabs %}
{% tab title="200 " %}

```
{"data":{"success":true}}
```

{% endtab %}
{% endtabs %}


# Trading Fees

## Get Fees

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/fees`

This endpoint allows you to fetch the scheduled fees for the all the pairs. It also returns your 30 day volume which you can use to calculate your fees.

#### Query Parameters

| Name | Type   | Description                         |
| ---- | ------ | ----------------------------------- |
| pair | string | Optionally filter the fees by pair. |

#### Headers

| Name   | Type   | Description                                       |
| ------ | ------ | ------------------------------------------------- |
| VTOKEN | string | Add your API token to authenticate your requests. |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "data": [
        {
            "bound": 5000,
            "pair": "GOLDBTC",
            "percentage": "0.50",
            "type": "MAKER"
        },
        {
            "bound": 5000,
            "pair": "GOLDBTC",
            "percentage": "0.50",
            "type": "TAKER"
        },
        {
            "bound": 5000,
            "pair": "GOLDDASH",
            "percentage": "0.50",
            "type": "MAKER"
        },
        {
            "bound": 5000,
            "pair": "GOLDDASH",
            "percentage": "0.50",
            "type": "TAKER"
        },
        {
            "bound": 25000,
            "pair": "GOLDBTC",
            "percentage": "0.45",
            "type": "MAKER"
        },
        {
            "bound": 25000,
            "pair": "GOLDBTC",
            "percentage": "0.48",
            "type": "TAKER"
        },
        {
            "bound": 25000,
            "pair": "GOLDDASH",
            "percentage": "0.45",
            "type": "MAKER"
        },
        {
            "bound": 25000,
            "pair": "GOLDDASH",
            "percentage": "0.48",
            "type": "TAKER"
        },
        {
            "bound": 100000,
            "pair": "GOLDBTC",
            "percentage": "0.40",
            "type": "MAKER"
        },
        {
            "bound": 100000,
            "pair": "GOLDBTC",
            "percentage": "0.45",
            "type": "TAKER"
        },
        {
            "bound": 100000,
            "pair": "GOLDDASH",
            "percentage": "0.40",
            "type": "MAKER"
        },
        {
            "bound": 100000,
            "pair": "GOLDDASH",
            "percentage": "0.45",
            "type": "TAKER"
        },
        {
            "bound": 1000000,
            "pair": "GOLDBTC",
            "percentage": "0.35",
            "type": "MAKER"
        },
        {
            "bound": 1000000,
            "pair": "GOLDBTC",
            "percentage": "0.43",
            "type": "TAKER"
        },
        {
            "bound": 1000000,
            "pair": "GOLDDASH",
            "percentage": "0.35",
            "type": "MAKER"
        },
        {
            "bound": 1000000,
            "pair": "GOLDDASH",
            "percentage": "0.43",
            "type": "TAKER"
        },
        {
            "bound": 5000000,
            "pair": "GOLDBTC",
            "percentage": "0.40",
            "type": "TAKER"
        },
        {
            "bound": 5000000,
            "pair": "GOLDDASH",
            "percentage": "0.00",
            "type": "MAKER"
        },
        {
            "bound": 5000000,
            "pair": "GOLDDASH",
            "percentage": "0.40",
            "type": "TAKER"
        },
        {
            "bound": 5000000,
            "pair": "GOLDBTC",
            "percentage": "0.00",
            "type": "MAKER"
        },
        {
            "bound": 10000000000,
            "pair": "DASHBTC",
            "percentage": "-0.05",
            "type": "MAKER"
        },
        {
            "bound": 10000000000,
            "pair": "GOLDDASH",
            "percentage": "-0.10",
            "type": "MAKER"
        },
        {
            "bound": 10000000000,
            "pair": "GOLDBTC",
            "percentage": "0.38",
            "type": "TAKER"
        },
        {
            "bound": 10000000000,
            "pair": "GOLDDASH",
            "percentage": "0.38",
            "type": "TAKER"
        },
        {
            "bound": 100000000000,
            "pair": "DASHBTC",
            "percentage": "0.10",
            "type": "TAKER"
        },
        {
            "bound": 5000000,
            "pair": "GOLDBTC",
            "percentage": "0.00",
            "type": "MAKER"
        },
        {
            "bound": 10000000000,
            "pair": "GOLDBTC",
            "percentage": "-0.10",
            "type": "MAKER"
        }
    ],
    "volume30": [
        {
            "handle": "EURCENT",
            "value": 206991.35576421986
        }
    ]
}

```

{% endtab %}
{% endtabs %}


# User

The endpoints for user data etc.

## Get User

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/me`

This endpoint allows you get information about yourself!

#### Headers

| Name   | Type   | Description                              |
| ------ | ------ | ---------------------------------------- |
| VTOKEN | string | Your API token to authenticate requests. |

{% tabs %}
{% tab title="200 Yourself, successfully retrieved." %}

```
{
    "data": {
        "countryHandle": "DE",
        "createdAt": 1594306991,
        "defaults": {
            "currency": "EURCENT",
            "pair": "GOLDBTC"
        },
        "email": "bob@no-address.com",
        "flags": {
            "optInNewsletter": true,
            "verified": true
        },
        "identity": {
            "address": "1 Long Road",
            "city": "London",
            "firstName": "Bob",
            "lastName": "Marley",
            "zipCode": "90210"
        },
        "languageHandle": "EN"
    }
}

```

{% endtab %}
{% endtabs %}


# Login History

This API is used for listing a user's login activity.

## Login History

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/history/logins`

#### Query Parameters

| Name          | Type    | Description                                                        |
| ------------- | ------- | ------------------------------------------------------------------ |
| until         | number  | Timestamp for the end date of the results                          |
| limit         | number  | Number of results per page                                         |
| page          | number  | The number of requested page.                                      |
| sortDirection | integer | The direction to sort by createdAt field. It can be either 1 or -1 |
| since         | number  | Timestamp for the beginning date of the results                    |

#### Headers

| Name   | Type   | Description   |
| ------ | ------ | ------------- |
| VTOKEN | string | The API token |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": {
        "results": [
            {
                "ts": 1618570442,
                "ip": "::ffff:127.0.0.1",
                "createdAt": "2021-04-16T10:54:02.000Z"
            },
            {
                "ts": 1618781118,
                "ip": "::ffff:127.0.0.1",
                "createdAt": "2021-04-18T21:25:18.000Z"
            },
            {
                "ts": 1618781546,
                "ip": "::ffff:127.0.0.1",
                "createdAt": "2021-04-18T21:32:26.000Z"
            },
            {
                "ts": 1618842209,
                "ip": "::ffff:127.0.0.1",
                "createdAt": "2021-04-19T14:23:29.000Z"
            },
            {
                "ts": 1618844021,
                "ip": "::ffff:127.0.0.1",
                "createdAt": "2021-04-19T14:53:41.000Z"
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}


# Change Email

This endpoint is used to request a confirmation link that contains the token to change email.

## Change email

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/user/changeEmail`

This endpoint is used to request a confirmation link to change email. When the user requests a confirmation link, an email containing a confirmation link is sent to the user's current email. If the user has enabled 2FA, OTP will be optional in the request body.

#### Headers

| Name           | Type   | Description  |
| -------------- | ------ | ------------ |
| Authentication | string | Bearer token |

#### Request Body

| Name     | Type   | Description                                            |
| -------- | ------ | ------------------------------------------------------ |
| otp      | string | If the user has enabled 2FA, this will be sent in body |
| password | string | User's existing password                               |
| newEmail | string | The new email that the user wants to have              |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{    "name": "Cake's name",    "recipe": "Cake's recipe name",    "cake": "Binary cake"}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}


# Audit

## Glass Book

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/glassbooks`

#### Query Parameters

| Name  | Type   | Description                      |
| ----- | ------ | -------------------------------- |
| q     | string | Client ID for filtering results. |
| page  | number | Filter results by page.          |
| limit | number | Limit number of results.         |

#### Headers

| Name   | Type   | Description     |
| ------ | ------ | --------------- |
| VTOKEN | string | Your API Token. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}


# Portfolio

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/stats/lastfx`

#### Query Parameters

| Name  | Type   | Description                                |
| ----- | ------ | ------------------------------------------ |
| asset | string | Optionally add asset to filter results by. |

#### Headers

| Name   | Type   | Description     |
| ------ | ------ | --------------- |
| VTOKEN | string | Your API Token. |

{% tabs %}
{% tab title="200 " %}

```
{
    "lastExchangeRate": [],
    "lastLogin": 1623669719
}
```

{% endtab %}
{% endtabs %}


# Pending Approvals

## Get Pending Withdrawal Approvals

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/coins/withdraw/approval`

This endpoint allows you fetch all pending withdrawal approvals of a user

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| Authorization | string | Bearer token |

{% tabs %}
{% tab title="200 If there are not any, the approvals array will be an empty array." %}

```
{
    "data": {
        "approvals": [
            {
                "referenceId": "c08e8kkqryr4dm",
                "asset": "ETH",
                "address": "0xc310800fbad7fe91acf195dac428430e4c847e6a",
                "quantity": "0.004",
                "createdAt": "2021-07-06T11:23:01.000Z"
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}


# Unverify

This endpoint disables 2FA and unverifies him.

## Unverify User

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/public/unverify`

This endpoint allows user to disable 2FA and also deletes the 2FA method of the user.

#### Request Body

| Name     | Type   | Description                  |
| -------- | ------ | ---------------------------- |
| password | string | User's account password      |
| token    | string | The token sent in the email. |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{    "name": "Cake's name",    "recipe": "Cake's recipe name",    "cake": "Binary cake"}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}


# Update Terms Version

This user update endpoint can be used to update the terms version that the user agrees on.

## Update User

<mark style="color:purple;">`PATCH`</mark> `https://api.vaultoro.com/v1/user`

This endpoint allows you to get free cakes.

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | Bearer xxx  |

#### Request Body

| Name         | Type    | Description                             |
| ------------ | ------- | --------------------------------------- |
| termsVersion | integer | The terms version that wanted to be set |
| action       | string  | specify the action as setTermsVersion   |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{    "name": "Cake's name",    "recipe": "Cake's recipe name",    "cake": "Binary cake"}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}


# Address Book

## Create Address

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/private/address`

This endpoint allows to add an address to the address book.

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| Authorization | string | Bearer token |

#### Request Body

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| tag      | string |             |
| address  | string |             |
| nickname | string |             |
| asset    | string | asset name  |
| otp      | string |             |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{    "name": "Cake's name",    "recipe": "Cake's recipe name",    "cake": "Binary cake"}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}


# Delete address

## Delete an address from address book.

<mark style="color:red;">`DELETE`</mark> `https://api.vaultoro.com/v1/private/address/:addressId`

This endpoint allows to delete an address from a user's address book.

#### Query Parameters

| Name                                  | Type   | Description |
| ------------------------------------- | ------ | ----------- |
| otp<mark style="color:red;">\*</mark> | String |             |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| Authorization | string | Bearer token. |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{    "name": "Cake's name",    "recipe": "Cake's recipe name",    "cake": "Binary cake"}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}


# Update Address

Updates an address

## Update Address

<mark style="color:purple;">`PATCH`</mark> `https://api.vaultoro.com/v1/private/address/:addressId`

This endpoint allows you to update an address.

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| Authorization | string | Bearer token |

#### Request Body

| Name     | Type   | Description         |
| -------- | ------ | ------------------- |
| tag      | string | new tag to set      |
| nickname | string | new nickname to set |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{    "name": "Cake's name",    "recipe": "Cake's recipe name",    "cake": "Binary cake"}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}


# List Addresses

Lists addresses in the addressbook for a user.

## Get Adresses

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/address`

This endpoint returns user's addresses saved in his address book.

#### Query Parameters

| Name  | Type   | Description                                             |
| ----- | ------ | ------------------------------------------------------- |
| asset | string | Optional asset parameter to filter the results by asset |

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| Authorization | string | Bearer token |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{    "name": "Cake's name",    "recipe": "Cake's recipe name",    "cake": "Binary cake"}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}


# Enable Address Book Whitelist

## Enables address book whitelisting

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/addressWhitelist`

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | bearer token |

#### Request Body

| Name                                  | Type   | Description             |
| ------------------------------------- | ------ | ----------------------- |
| otp<mark style="color:red;">\*</mark> | String | Auth app or yubikey otp |


# Disable address book whitelist

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/private/addressWhitelist`

Disables address book whitelisting.

#### Query Parameters

| Name                                  | Type   | Description              |
| ------------------------------------- | ------ | ------------------------ |
| otp<mark style="color:red;">\*</mark> | String | auth app or yubi key otp |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer token |


