curl --request GET \
--url https://api.amberdata.com/markets/spot/analytics/depth/lwap \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/spot/analytics/depth/lwap"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.amberdata.com/markets/spot/analytics/depth/lwap', 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.amberdata.com/markets/spot/analytics/depth/lwap",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.amberdata.com/markets/spot/analytics/depth/lwap"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.amberdata.com/markets/spot/analytics/depth/lwap")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/spot/analytics/depth/lwap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"data": [
{
"basisPoints005": 5.54432285,
"basisPoints005OrderCount": 61,
"basisPoints025": 55.42346636999996,
"basisPoints025OrderCount": 212,
"basisPoints050": 86.13989642000006,
"basisPoints050OrderCount": 264,
"basisPoints100": 162.79283695000004,
"basisPoints100OrderCount": 398,
"bestAskPrice": 84160.01,
"bestBidPrice": 84160,
"exchange": "gdax",
"lwap005": 84182.63687387163,
"lwap005ExecutionVersusBBO": 0.026885540854415524,
"lwap005UsdMillion": 0.46673571719305906,
"lwap025": 84275.95356466963,
"lwap025ExecutionVersusBBO": 0.13776562606115927,
"lwap025UsdMillion": 4.670865478191145,
"lwap050": 84332.34147661841,
"lwap050ExecutionVersusBBO": 0.20476646404679055,
"lwap050UsdMillion": 7.264379159651985,
"lwap100": 84549.86045854498,
"lwap100ExecutionVersusBBO": 0.4632252996939812,
"lwap100UsdMillion": 13.764111647773168,
"midPrice": 84160.005,
"pair": "btc_usd",
"side": "ask",
"slippage005UsdVersusBBO": 12548.44219280892,
"slippage025UsdVersusBBO": 643484.7068504592,
"slippage050UsdVersusBBO": 1487501.2340171328,
"slippage100UsdVersusBBO": 6375884.743061143,
"spreadPercent": 0.000011882128565416923,
"timestamp": "2025-03-15 00:27:00 000"
}
]
}
}{}LWAP
Liquidity Weighted Average Price (LWAP) represents the average execution price achieved when trading through all resting orders in the order book (sweeping the book), up to a specified depth. For example, if you sell through the book down to 50 basis points away from the best-bid/best-ask, LWAP calculates the average execution price for that trade.
curl --request GET \
--url https://api.amberdata.com/markets/spot/analytics/depth/lwap \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/spot/analytics/depth/lwap"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.amberdata.com/markets/spot/analytics/depth/lwap', 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.amberdata.com/markets/spot/analytics/depth/lwap",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.amberdata.com/markets/spot/analytics/depth/lwap"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.amberdata.com/markets/spot/analytics/depth/lwap")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/spot/analytics/depth/lwap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"data": [
{
"basisPoints005": 5.54432285,
"basisPoints005OrderCount": 61,
"basisPoints025": 55.42346636999996,
"basisPoints025OrderCount": 212,
"basisPoints050": 86.13989642000006,
"basisPoints050OrderCount": 264,
"basisPoints100": 162.79283695000004,
"basisPoints100OrderCount": 398,
"bestAskPrice": 84160.01,
"bestBidPrice": 84160,
"exchange": "gdax",
"lwap005": 84182.63687387163,
"lwap005ExecutionVersusBBO": 0.026885540854415524,
"lwap005UsdMillion": 0.46673571719305906,
"lwap025": 84275.95356466963,
"lwap025ExecutionVersusBBO": 0.13776562606115927,
"lwap025UsdMillion": 4.670865478191145,
"lwap050": 84332.34147661841,
"lwap050ExecutionVersusBBO": 0.20476646404679055,
"lwap050UsdMillion": 7.264379159651985,
"lwap100": 84549.86045854498,
"lwap100ExecutionVersusBBO": 0.4632252996939812,
"lwap100UsdMillion": 13.764111647773168,
"midPrice": 84160.005,
"pair": "btc_usd",
"side": "ask",
"slippage005UsdVersusBBO": 12548.44219280892,
"slippage025UsdVersusBBO": 643484.7068504592,
"slippage050UsdVersusBBO": 1487501.2340171328,
"slippage100UsdVersusBBO": 6375884.743061143,
"spreadPercent": 0.000011882128565416923,
"timestamp": "2025-03-15 00:27:00 000"
}
]
}
}{}Authorizations
Query Parameters
[Required] The exchange for which to retrieve listed spot instruments.
[Examples] gdax | okex | binance | binanceus
[Required] The currency pair for the spot instrument.
[Examples] btc_usd | btc_usdc | eth_usd
[Optional] Payload only includes data after this date (inclusive).
[Formats] seconds | milliseconds | iso8601
[Examples] 1578531600 | 1578531600000 | 2025-02-27
[Optional] Payload only includes data up to this date (exclusive).
[Formats] seconds | milliseconds | iso8601
[Examples] 1578531600 | 1578531600000 | 2025-02-27
[Optional] Time format of the timestamps in the return payload.
[Defaults] milliseconds | ms* | iso | iso8601 | hr | human_readable
Was this page helpful?