Recent Trades
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": "19.29",
"trade_timestamp": 1594391747,
"type": "sell",
"rpi": true
},
{
"tradeID": 158056416,
"price": "9186.13",
"quote_volume": "0.002751",
"base_volume": "25.27",
"trade_timestamp": 1594391746,
"type": "sell",
"rpi": false
}
]
Recent trades
The endpoint retrieves the trades that have been executed recently on the requested market. It returns up to the 100 most recent trades; the response size is fixed and there is no limit parameter.
The API caches the response for 1 second
Public trade data can include executions that originate from RPI orders. Public order book feeds (depth, bookTicker) exclude RPI orders. RPI orders appear only in private active orders and in the exchange UI order book (web and mobile).
Rate limit 2000 requests/10 sec.
GET
/
api
/
v4
/
public
/
trades
/
{market}
Recent Trades
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": "19.29",
"trade_timestamp": 1594391747,
"type": "sell",
"rpi": true
},
{
"tradeID": 158056416,
"price": "9186.13",
"quote_volume": "0.002751",
"base_volume": "25.27",
"trade_timestamp": 1594391746,
"type": "sell",
"rpi": false
}
]
Query Parameters
Response
Successful response
Was this page helpful?