Ended positions
curl --request GET \
--url https://data.rekt.trading/v0/positionsimport requests
url = "https://data.rekt.trading/v0/positions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data.rekt.trading/v0/positions', 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://data.rekt.trading/v0/positions",
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://data.rekt.trading/v0/positions"
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://data.rekt.trading/v0/positions")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.rekt.trading/v0/positions")
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{
"asOf": {
"generatedAt": "2023-11-07T05:31:56Z",
"archiveTailSlot": 123,
"archiveTailAt": "2023-11-07T05:31:56Z",
"stale": true,
"staleReason": "<string>",
"entryFeeBasis": "observed"
},
"tier": "public",
"window": {
"hours": 48,
"since": "2023-11-07T05:31:56Z",
"rule": "<string>"
},
"filters": {
"owner": "<string>",
"market": "<string>",
"phase": "<string>",
"signature": "<string>",
"beforeSlot": "<string>",
"limit": 123
},
"sampleSize": 123,
"totalMatching": 123,
"nextBeforeSlot": 123,
"positions": [
{
"owner": "<string>",
"market": "<string>",
"seq": "<string>",
"phase": "settled",
"slot": 123,
"direction": "long",
"tier": "<string>",
"stake": "<string>",
"priceKind": "<string>",
"phaseAt": 123,
"phaseSlot": 123,
"endedAt": 123,
"commit": {
"signature": "<string>",
"slot": 123,
"blockTime": 123
},
"entry": {
"price": "<string>",
"expo": 123,
"fee": "<string>",
"tick": {
"role": "<string>",
"tickUs": "<string>",
"targetUs": "<string>",
"channel": 123,
"session": 123,
"updateAgeUs": "<string>",
"slot": "<string>"
},
"fill": {
"slot": 123,
"blockTime": 123
}
},
"voided": {
"reason": "<string>",
"text": "<string>",
"refundTotal": "<string>",
"feeKept": "<string>",
"feeRefunded": "<string>",
"delivered": true,
"balanced": true,
"slot": 123,
"blockTime": 123,
"tick": {
"role": "<string>",
"tickUs": "<string>",
"targetUs": "<string>",
"channel": 123,
"session": 123,
"updateAgeUs": "<string>",
"slot": "<string>"
}
},
"adds": [
{
"addedCollateral": "<string>",
"totalDebit": "<string>",
"fee": "<string>",
"phase": "add-pending",
"commit": {
"signature": "<string>",
"slot": 123,
"blockTime": 123
},
"filled": {
"entryPrice": "<string>",
"entryPriceBefore": "<string>",
"slot": 123,
"blockTime": 123
},
"reversed": {
"reason": "<string>",
"text": "<string>",
"refundTotal": "<string>",
"feeKept": "<string>",
"feeRefunded": "<string>",
"delivered": true,
"balanced": true,
"slot": 123,
"blockTime": 123
}
}
],
"exit": {
"kind": "close-requested",
"reason": "<string>",
"clockS": "<string>",
"slot": 123,
"blockTime": 123
},
"stamp": {
"level": "knockout",
"price": "<string>",
"beforeAdd": true,
"tick": {
"role": "<string>",
"tickUs": "<string>",
"targetUs": "<string>",
"channel": 123,
"session": 123,
"updateAgeUs": "<string>",
"slot": "<string>"
},
"slot": 123,
"blockTime": 123
},
"settlement": {
"settledAt": 123,
"reason": "<string>",
"stake": "<string>",
"payoutTrader": "<string>",
"verified": true,
"tick": {
"role": "<string>",
"tickUs": "<string>",
"targetUs": "<string>",
"channel": 123,
"session": 123,
"updateAgeUs": "<string>",
"slot": "<string>"
},
"receipt": {
"exitFeeTotal": "<string>",
"lossTaxTotal": "<string>",
"payoutTrader": "<string>",
"priceKind": "<string>",
"tick": {
"role": "<string>",
"tickUs": "<string>",
"targetUs": "<string>",
"channel": 123,
"session": 123,
"updateAgeUs": "<string>",
"slot": "<string>"
}
},
"slot": 123,
"blockTime": 123
},
"feeTerms": {
"closed": {
"applied": true,
"haircut": "<string>",
"exitFeeTotal": "<string>"
}
}
}
],
"note": "<string>"
}{
"error": "<string>",
"retryAfterSeconds": 123,
"routes": [
"<string>"
]
}{
"error": "<string>",
"retryAfterSeconds": 123,
"routes": [
"<string>"
]
}{
"error": "<string>",
"retryAfterSeconds": 123,
"routes": [
"<string>"
]
}{
"error": "<string>",
"retryAfterSeconds": 123,
"routes": [
"<string>"
]
}Positions
Ended positions
Positions that ended in the last 48 hours, newest first: settled, or an order that the venue returned. Read a position that is still open from the chain. A page holds at most 100 rows. Page with beforeSlot.
GET
/
v0
/
positions
Ended positions
curl --request GET \
--url https://data.rekt.trading/v0/positionsimport requests
url = "https://data.rekt.trading/v0/positions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data.rekt.trading/v0/positions', 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://data.rekt.trading/v0/positions",
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://data.rekt.trading/v0/positions"
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://data.rekt.trading/v0/positions")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.rekt.trading/v0/positions")
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{
"asOf": {
"generatedAt": "2023-11-07T05:31:56Z",
"archiveTailSlot": 123,
"archiveTailAt": "2023-11-07T05:31:56Z",
"stale": true,
"staleReason": "<string>",
"entryFeeBasis": "observed"
},
"tier": "public",
"window": {
"hours": 48,
"since": "2023-11-07T05:31:56Z",
"rule": "<string>"
},
"filters": {
"owner": "<string>",
"market": "<string>",
"phase": "<string>",
"signature": "<string>",
"beforeSlot": "<string>",
"limit": 123
},
"sampleSize": 123,
"totalMatching": 123,
"nextBeforeSlot": 123,
"positions": [
{
"owner": "<string>",
"market": "<string>",
"seq": "<string>",
"phase": "settled",
"slot": 123,
"direction": "long",
"tier": "<string>",
"stake": "<string>",
"priceKind": "<string>",
"phaseAt": 123,
"phaseSlot": 123,
"endedAt": 123,
"commit": {
"signature": "<string>",
"slot": 123,
"blockTime": 123
},
"entry": {
"price": "<string>",
"expo": 123,
"fee": "<string>",
"tick": {
"role": "<string>",
"tickUs": "<string>",
"targetUs": "<string>",
"channel": 123,
"session": 123,
"updateAgeUs": "<string>",
"slot": "<string>"
},
"fill": {
"slot": 123,
"blockTime": 123
}
},
"voided": {
"reason": "<string>",
"text": "<string>",
"refundTotal": "<string>",
"feeKept": "<string>",
"feeRefunded": "<string>",
"delivered": true,
"balanced": true,
"slot": 123,
"blockTime": 123,
"tick": {
"role": "<string>",
"tickUs": "<string>",
"targetUs": "<string>",
"channel": 123,
"session": 123,
"updateAgeUs": "<string>",
"slot": "<string>"
}
},
"adds": [
{
"addedCollateral": "<string>",
"totalDebit": "<string>",
"fee": "<string>",
"phase": "add-pending",
"commit": {
"signature": "<string>",
"slot": 123,
"blockTime": 123
},
"filled": {
"entryPrice": "<string>",
"entryPriceBefore": "<string>",
"slot": 123,
"blockTime": 123
},
"reversed": {
"reason": "<string>",
"text": "<string>",
"refundTotal": "<string>",
"feeKept": "<string>",
"feeRefunded": "<string>",
"delivered": true,
"balanced": true,
"slot": 123,
"blockTime": 123
}
}
],
"exit": {
"kind": "close-requested",
"reason": "<string>",
"clockS": "<string>",
"slot": 123,
"blockTime": 123
},
"stamp": {
"level": "knockout",
"price": "<string>",
"beforeAdd": true,
"tick": {
"role": "<string>",
"tickUs": "<string>",
"targetUs": "<string>",
"channel": 123,
"session": 123,
"updateAgeUs": "<string>",
"slot": "<string>"
},
"slot": 123,
"blockTime": 123
},
"settlement": {
"settledAt": 123,
"reason": "<string>",
"stake": "<string>",
"payoutTrader": "<string>",
"verified": true,
"tick": {
"role": "<string>",
"tickUs": "<string>",
"targetUs": "<string>",
"channel": 123,
"session": 123,
"updateAgeUs": "<string>",
"slot": "<string>"
},
"receipt": {
"exitFeeTotal": "<string>",
"lossTaxTotal": "<string>",
"payoutTrader": "<string>",
"priceKind": "<string>",
"tick": {
"role": "<string>",
"tickUs": "<string>",
"targetUs": "<string>",
"channel": 123,
"session": 123,
"updateAgeUs": "<string>",
"slot": "<string>"
}
},
"slot": 123,
"blockTime": 123
},
"feeTerms": {
"closed": {
"applied": true,
"haircut": "<string>",
"exitFeeTotal": "<string>"
}
}
}
],
"note": "<string>"
}{
"error": "<string>",
"retryAfterSeconds": 123,
"routes": [
"<string>"
]
}{
"error": "<string>",
"retryAfterSeconds": 123,
"routes": [
"<string>"
]
}{
"error": "<string>",
"retryAfterSeconds": 123,
"routes": [
"<string>"
]
}{
"error": "<string>",
"retryAfterSeconds": 123,
"routes": [
"<string>"
]
}Query Parameters
Response
A page of ended positions.
A page of positions that have ended, newest first.
