curl --request GET \
--url https://api.seesaw.fun/open/v1/me/positions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.seesaw.fun/open/v1/me/positions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.seesaw.fun/open/v1/me/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://api.seesaw.fun/open/v1/me/positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.seesaw.fun/open/v1/me/positions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.seesaw.fun/open/v1/me/positions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.seesaw.fun/open/v1/me/positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"topic": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "<string>",
"mechanism": "<string>",
"close_time": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"option": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"index": 123
},
"stake_coins": "<string>",
"units": "<string>",
"entry_price": "<string>",
"current_price": "<string>",
"settled": true,
"settled_at": "2023-11-07T05:31:56Z",
"refunded": true,
"invalid_reason": "<string>",
"won": true,
"payout_rubies": "<string>"
}
],
"next_cursor": "<string>",
"has_more": true
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}List the key owner's positions
One row per (topic, option). Branch on refunded first, then on
settled — settled alone does not tell you whether won is
readable:
- Refunded —
refunded: true, the stake came back.wonandpayout_rubiesare null, andsettledistrueon a ruled-invalid refund butfalseon an ops takedown. Neither a win nor a loss. - Settled —
refunded: false,settled: true:wonandpayout_rubiesare set. - Open —
refunded: false,settled: false: both null.
A settled: true row with a null won is therefore a refund, not a
server-side error.
curl --request GET \
--url https://api.seesaw.fun/open/v1/me/positions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.seesaw.fun/open/v1/me/positions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.seesaw.fun/open/v1/me/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://api.seesaw.fun/open/v1/me/positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.seesaw.fun/open/v1/me/positions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.seesaw.fun/open/v1/me/positions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.seesaw.fun/open/v1/me/positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"topic": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "<string>",
"mechanism": "<string>",
"close_time": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"option": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"index": 123
},
"stake_coins": "<string>",
"units": "<string>",
"entry_price": "<string>",
"current_price": "<string>",
"settled": true,
"settled_at": "2023-11-07T05:31:56Z",
"refunded": true,
"invalid_reason": "<string>",
"won": true,
"payout_rubies": "<string>"
}
],
"next_cursor": "<string>",
"has_more": true
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}Authorizations
Personal API key issued per SeeSaw user account:
Authorization: Bearer sspat_…. Manage keys on the app API
(/v1/users/me/api-keys). Revocation propagates within ~60 seconds
(validation cache window).
The key's scopes decide what it may do: every key has read; a key
created with ["read","write"] may also use the six write operations
(marked x-required-scope: write in this document). Scopes are fixed at
creation — to gain write access, create a new key. A read-only key
calling a write operation gets 403 FORBIDDEN_SCOPE.
Query Parameters
month narrows to the current calendar month (Hong Kong time).
all, month latest, settled Opaque pagination cursor from a previous response's next_cursor.
Page size (max 100).
1 <= x <= 100