📕
Vaultoro API Docs
  • Getting Started
  • Example API Calls
  • Public
    • Reset email
    • OHLC
    • Orders
    • Ticker
    • Trades
    • Trading Fees
    • Audit
  • Private
  • Ledger
  • Assets
  • Balances
  • History
    • Export
    • Fees
    • Trades
    • Transactions
  • Orders
  • OTC
  • Referrals
  • Tokens
  • Trading Fees
  • User
  • Login History
  • Change Email
  • Audit
  • Portfolio
  • Pending Approvals
  • Unverify
  • Update Terms Version
  • Address Book
    • Delete address
    • Update Address
    • List Addresses
    • Enable Address Book Whitelist
    • Disable address book whitelist
Powered by GitBook
On this page
  • Getting Your Balance
  • Creating an Order

Was this helpful?

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
	}
}
PreviousGetting StartedNextReset email

Last updated 4 years ago

Was this helpful?