Get live crypto reference prices
curl --request POST \
--url https://api.agg.market/crypto/reference-prices \
--header 'Content-Type: application/json' \
--header 'x-app-id: <api-key>' \
--data '
{
"targets": [
{
"type": "venueMarket",
"venueMarketId": "<string>"
}
]
}
'import requests
url = "https://api.agg.market/crypto/reference-prices"
payload = { "targets": [
{
"type": "venueMarket",
"venueMarketId": "<string>"
}
] }
headers = {
"x-app-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-app-id': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({targets: [{type: 'venueMarket', venueMarketId: '<string>'}]})
};
fetch('https://api.agg.market/crypto/reference-prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.agg.market/crypto/reference-prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'targets' => [
[
'type' => 'venueMarket',
'venueMarketId' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-app-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.agg.market/crypto/reference-prices"
payload := strings.NewReader("{\n \"targets\": [\n {\n \"type\": \"venueMarket\",\n \"venueMarketId\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-app-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.agg.market/crypto/reference-prices")
.header("x-app-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"targets\": [\n {\n \"type\": \"venueMarket\",\n \"venueMarketId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/crypto/reference-prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targets\": [\n {\n \"type\": \"venueMarket\",\n \"venueMarketId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"target": {
"type": "venueMarket",
"venueMarketId": "<string>"
},
"venueEventId": "<string>",
"venueMarketId": "<string>",
"externalEventId": "<string>",
"externalMarketId": "<string>",
"asset": "<string>",
"quoteAsset": "USD",
"raw": "<string>",
"decimals": 123,
"normalized": 123,
"providerTimestamp": "<string>",
"fetchedAt": "<string>",
"ageMs": 123,
"refreshing": true,
"stale": true,
"source": {
"provider": "<string>",
"providerMarketId": "<string>"
},
"error": {
"message": "<string>"
}
}
],
"softRefreshMs": 123,
"hardMaxAgeMs": 123
}{
"message": "<string>"
}{
"message": "<string>"
}Discovery
Get live crypto reference prices
Returns fresh reference prices for recurring crypto market targets. Responses are never older than 1 second; concurrent requests are deduplicated across API instances.
POST
/
crypto
/
reference-prices
Get live crypto reference prices
curl --request POST \
--url https://api.agg.market/crypto/reference-prices \
--header 'Content-Type: application/json' \
--header 'x-app-id: <api-key>' \
--data '
{
"targets": [
{
"type": "venueMarket",
"venueMarketId": "<string>"
}
]
}
'import requests
url = "https://api.agg.market/crypto/reference-prices"
payload = { "targets": [
{
"type": "venueMarket",
"venueMarketId": "<string>"
}
] }
headers = {
"x-app-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-app-id': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({targets: [{type: 'venueMarket', venueMarketId: '<string>'}]})
};
fetch('https://api.agg.market/crypto/reference-prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.agg.market/crypto/reference-prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'targets' => [
[
'type' => 'venueMarket',
'venueMarketId' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-app-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.agg.market/crypto/reference-prices"
payload := strings.NewReader("{\n \"targets\": [\n {\n \"type\": \"venueMarket\",\n \"venueMarketId\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-app-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.agg.market/crypto/reference-prices")
.header("x-app-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"targets\": [\n {\n \"type\": \"venueMarket\",\n \"venueMarketId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/crypto/reference-prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targets\": [\n {\n \"type\": \"venueMarket\",\n \"venueMarketId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"target": {
"type": "venueMarket",
"venueMarketId": "<string>"
},
"venueEventId": "<string>",
"venueMarketId": "<string>",
"externalEventId": "<string>",
"externalMarketId": "<string>",
"asset": "<string>",
"quoteAsset": "USD",
"raw": "<string>",
"decimals": 123,
"normalized": 123,
"providerTimestamp": "<string>",
"fetchedAt": "<string>",
"ageMs": 123,
"refreshing": true,
"stale": true,
"source": {
"provider": "<string>",
"providerMarketId": "<string>"
},
"error": {
"message": "<string>"
}
}
],
"softRefreshMs": 123,
"hardMaxAgeMs": 123
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Your application ID. Required for all app-tier and user-tier routes.
Body
application/json
Required array length:
1 - 100 elements- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
⌘I