curl --request GET \
--url https://test.deribit.com/api/v2/public/test \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 8212,
"method": "public/test",
"params": {}
}
'{
"jsonrpc": "2.0",
"id": 8212,
"result": {
"version": "1.2.26"
}
}Supporting
public/test
Tests the connection to the API server, and returns its version. You can use this to make sure the API is reachable, and matches the expected version.
With expected_result set to exception the server returns error 11094 (internal_server_error) instead of the version, for example:
{"jsonrpc": "2.0", "id": 8213, "error": {"message": "internal_server_error", "code": 11094}}
curl --request GET \
--url https://test.deribit.com/api/v2/public/test \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 8212,
"method": "public/test",
"params": {}
}
'{
"jsonrpc": "2.0",
"id": 8212,
"result": {
"version": "1.2.26"
}
}Query Parameters
The value "exception" will trigger an error response with code 11094 (internal_server_error). This may be useful for testing wrapper libraries.
Available options:
exception Was this page helpful?