Update event
curl --request PATCH \
--url https://api.oddpool.com/whales/user/events/{event_id} \
--header 'Content-Type: application/json' \
--data '
{
"whale_threshold_usd": 123
}
'import requests
url = "https://api.oddpool.com/whales/user/events/{event_id}"
payload = { "whale_threshold_usd": 123 }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({whale_threshold_usd: 123})
};
fetch('https://api.oddpool.com/whales/user/events/{event_id}', 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.oddpool.com/whales/user/events/{event_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'whale_threshold_usd' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.oddpool.com/whales/user/events/{event_id}"
payload := strings.NewReader("{\n \"whale_threshold_usd\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.oddpool.com/whales/user/events/{event_id}")
.header("Content-Type", "application/json")
.body("{\n \"whale_threshold_usd\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oddpool.com/whales/user/events/{event_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"whale_threshold_usd\": 123\n}"
response = http.request(request)
puts response.read_bodyWhale tracking
Update event
Change the whale threshold for a tracked event.
PATCH
/
whales
/
user
/
events
/
{event_id}
Update event
curl --request PATCH \
--url https://api.oddpool.com/whales/user/events/{event_id} \
--header 'Content-Type: application/json' \
--data '
{
"whale_threshold_usd": 123
}
'import requests
url = "https://api.oddpool.com/whales/user/events/{event_id}"
payload = { "whale_threshold_usd": 123 }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({whale_threshold_usd: 123})
};
fetch('https://api.oddpool.com/whales/user/events/{event_id}', 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.oddpool.com/whales/user/events/{event_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'whale_threshold_usd' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.oddpool.com/whales/user/events/{event_id}"
payload := strings.NewReader("{\n \"whale_threshold_usd\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.oddpool.com/whales/user/events/{event_id}")
.header("Content-Type", "application/json")
.body("{\n \"whale_threshold_usd\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oddpool.com/whales/user/events/{event_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"whale_threshold_usd\": 123\n}"
response = http.request(request)
puts response.read_bodyUpdates the per-event settings for an event you already track. Use it to raise or lower the dollar threshold that defines a whale on this event.
Path parameters
integer
required
The numeric tracking id, as returned by List events or Add event.
Body parameters
number
Minimum trade size, in USD, for a trade on this event to count as a whale.
Example
curl -X PATCH "https://api.oddpool.com/whales/user/events/65" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{"whale_threshold_usd": 10000}'
import requests
response = requests.patch(
"https://api.oddpool.com/whales/user/events/65",
headers={"X-API-Key": "your_api_key"},
json={"whale_threshold_usd": 10000},
)
data = response.json()
Response
{
"success": true,
"event_id": 65,
"whale_threshold_usd": 10000,
"notify_on_whale_trade": true
}
Errors
| Status | Reason |
|---|---|
401 | Missing or invalid API key. |
403 | Your plan does not include whale tracking, or your subscription is inactive. |
404 | You are not tracking this event. |
⌘I