API structure
Use our REST API for request-response messaging over HTTP between your app and Bitvavo.
Request format
All API requests are made to https://api.bitvavo.com/v2/
and include:
HTTP method
The HTTP method of an endpoint defines the type of action it performs on a given resource. The Bitvavo API supports the following methods:
GET
- retrieve information.POST
- submit data to create a resource.PUT
- update a resource.DELETE
- remove a resource.
Path
Each endpoint has a path. The reference documentation for each endpoint includes the path to use in your request, for example GET /{market}/trades
.
The curly brackets {}
indicate a path parameter that you need to replace with the actual value. For example, in the path /markets/{market}
, replace {market}
with the actual market you want to retrieve information about.
Headers
Every request includes the following headers:
Content-Type: application/json
- indicates that the request body is in JSON format.- For authenticated endpoints, additional headers are required:
Bitvavo-Access-Key
: your API key.Bitvavo-Access-Signature
: a SHA256 HMAC hex digest.Bitvavo-Access-Timestamp
: Unix timestamp in milliseconds.Bitvavo-Access-Window
: (optional) time window for request validity in milliseconds.
Authentication
To authenticate requests, you need to create a signature using your API secret and the headers specified above. The signature is a SHA256 HMAC hex digest of the concatenated string: timestamp + method + url + body
.
To learn how to create a signature, see Authentication.
curl -L 'https://api.bitvavo.com/v2/order' \
-H 'Content-Type: application/json' \
-H 'Bitvavo-Access-Key: YOUR_API_KEY' \
-H 'Bitvavo-Access-Signature: YOUR_GENERATED_SIGNATURE' \
-H 'Bitvavo-Access-Timestamp: CURRENT_TIMESTAMP' \
-H 'Bitvavo-Access-Window: 10000' \
-D '{
"market": "BTC-EUR",
"side": "buy",
"orderType": "limit",
"amount": "1.5",
"price": "30000"
}'
Parameters
Some API methods require or allow you to send additional information in parameters in your request. These can be: path parameters, body parameters, and query parameters.
Path parameters
Path parameters required and modify the endpoint path. For example, in the path /markets/{market}
, replace {market}
with the actual market you want to retrieve information about.
Query parameters
Query parameters are optional and are added to the URL after a ?
. They are used to filter or modify the response.
GET /BTC-EUR/trades?limit=5
Body parameters
Body parameters allow you to pass additional data to the API, mostly in POST and PUT requests. These parameters can be optional or required, depending on the endpoint.
Response format
After you make a request, the API returns:
Status code
Indicates the success or failure of the request, for example 200 OK. For example:
Status Code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | The request was malformed or contained invalid parameters. |
403 Forbidden | The request is not allowed, or permissions are insufficient. |
429 Too Many Requests | The request was rate-limited. |
500 Internal Server Error | A problem occurred on Bitvavo's server. |
To learn more, see the full list of error codes.
Response headers
Include the rate limit information:
bitvavo-ratelimit-remaining
: number of remaining wight points before the reset.bitvavo-ratelimit-resetat
: the time whenbitvavo-ratelimit-remaining
resets tobitvavo-ratelimit-limit
.bitvavo-ratelimit-limit
: number of available weight points in one minute.
Response body
The response body is a JSON object with the requested information or an error message. For example:
{
"orderId": "1be6d0df-d5dc-4b53-a250-1234567890ab",
"market": "BTC-EUR",
"created": 1615555555555,
"updated": 1615555555555,
"status": "new",
"side": "buy",
"orderType": "limit",
"amount": "1.5",
"amountRemaining": "1.5",
"price": "30000",
"amountQuote": "45000",
"amountQuoteRemaining": "45000",
"onHold": "1.5",
"onHoldCurrency": "BTC",
"filledAmount": "0",
"filledAmountQuote": "0",
"feePaid": "0",
"feeCurrency": "EUR",
"fills": [],
"selfTradePrevention": "decrementAndCancel",
"visible": true,
"timeInForce": "GTC",
"postOnly": false,
"disableMarketProtection": false
}
Endpoints
Below are the available endpoints for the Bitvavo REST API.
Public endpoints
The endpoints below return public information about markets and trades on Bitvavo. You can make calls to these endpoints without your API key and secret. However, unauthenticated calls have lower rate limits based on your IP address, and your account is blocked for longer if you exceed your limit.
Market data endpoints
GET /{market}/book
- get the order book for a specific market.GET /{market}/trades
- get recent public trades for a specific market.GET /ticker/price
- obtain the latest price for all markets or a specific market.GET /ticker/book
- get the current best bid and ask for all or a specific market.GET /{market}/candles
- get historical candlestick data for a market.GET /ticker/24h
- access 24-hour statistics for all or a specific market.
Synchronization endpoints
GET /time
- get the current server time.GET /markets
- get information about all available trading pairs.GET /assets
- get details about all supported assets.
Private endpoints
The endpoints below enable account-specific interactions, such as placing and managing orders, viewing your account history, or withdrawing assets. For these calls to succeed you must create your API key and secret and make authenticated calls.
Trading endpoints
POST /order
- place a new order.PUT /order
- update an existing order.GET /order
- get information about an existing order.DELETE /order
- cancel an open order.GET /ordersOpen
- list all open orders.GET /trades
- get all trades for a specific market.GET /orders
- get all orders for a specific market.DELETE /orders
- multiple orders for the specified market or the account.
Transfer endpoints
GET /deposit
- get deposit addresses for a specific asset.GET /depositHistory
- get account deposit history.POST /withdrawal
- request a withdrawal to an external address.GET /withdrawalHistory
- get account withdrawal history.
Account endpoints
GET /account
- get account information, including fee tiers.GET /balance
- get balances of all assets in your account.GET /account/fees
- get information about trading fees.GET /account/history
- get account transaction history.
Handle errors
In case of errors, the API responds with an HTTP status code and a JSON object with the error details.
{
"errorCode": 205,
"error": "Invalid parameter: price"
}
To learn more, see the full list of error codes.