curl --request GET \
--url https://whitebit.com/api/v4/public/trades/{market}import requests
url = "https://whitebit.com/api/v4/public/trades/{market}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://whitebit.com/api/v4/public/trades/{market}', 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://whitebit.com/api/v4/public/trades/{market}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://whitebit.com/api/v4/public/trades/{market}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://whitebit.com/api/v4/public/trades/{market}")
.asString();require 'uri'
require 'net/http'
url = URI("https://whitebit.com/api/v4/public/trades/{market}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"tradeID": 158056419,
"price": "9186.13",
"quote_volume": "0.0021",
"base_volume": "0.0021",
"trade_timestamp": 1594391747,
"type": "sell",
"rpi": true
},
{
"tradeID": 158056416,
"price": "9186.13",
"quote_volume": "0.002751",
"base_volume": "0.002751",
"trade_timestamp": 1594391746,
"type": "sell",
"rpi": false
}
]{
"success": false,
"message": "ERROR MESSAGE",
"params": []
}Recent trades
Get the most recent trades executed on a specific market on WhiteBIT via the V4 API.
curl --request GET \
--url https://whitebit.com/api/v4/public/trades/{market}import requests
url = "https://whitebit.com/api/v4/public/trades/{market}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://whitebit.com/api/v4/public/trades/{market}', 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://whitebit.com/api/v4/public/trades/{market}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://whitebit.com/api/v4/public/trades/{market}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://whitebit.com/api/v4/public/trades/{market}")
.asString();require 'uri'
require 'net/http'
url = URI("https://whitebit.com/api/v4/public/trades/{market}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"tradeID": 158056419,
"price": "9186.13",
"quote_volume": "0.0021",
"base_volume": "0.0021",
"trade_timestamp": 1594391747,
"type": "sell",
"rpi": true
},
{
"tradeID": 158056416,
"price": "9186.13",
"quote_volume": "0.002751",
"base_volume": "0.002751",
"trade_timestamp": 1594391746,
"type": "sell",
"rpi": false
}
]{
"success": false,
"message": "ERROR MESSAGE",
"params": []
}Path Parameters
Market pair name
"BTC_USDT"
Query Parameters
Filter by trade side. Omit to return both buy and sell trades.
buy, sell "sell"
Response
Successful response
A unique ID associated with the trade for the currency pair transaction Note: Unix timestamp does not qualify as trade_id.
158056419
Transaction price in quote pair volume.
"9186.13"
Transaction amount in the quote (stock) currency. In a BTC_USDT market, the value is the BTC amount. Note: WhiteBIT uses a reversed naming convention compared to standard exchange terminology — the stock/asset currency is called 'quote' here.
"0.0021"
Transaction amount in the base (money) currency. In a BTC_USDT market, the value is the USDT amount. Note: WhiteBIT uses a reversed naming convention compared to standard exchange terminology — the settlement/pricing currency is called 'base' here.
"9186.13"
Unix timestamp in seconds (UTC). Identifies when the transaction occurred.
1594391747
Used to determine whether or not the transaction originated as a buy or sell. Buy – Identifies an ask that was removed from the order book. Sell – Identifies a bid that was removed from the order book.
buy, sell "sell"
Indicates that the trade originates from a Retail Price Improvement (RPI) order.
true
Was this page helpful?