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.

If successful, your response will look like this.

To cancel this order, use the referenceId returned.

If successful, you will receive the following response.

Last updated

Was this helpful?