curl --request POST \
--url https://api.seesaw.fun/open/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirm_token": "oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg"
}
'import requests
url = "https://api.seesaw.fun/open/v1/orders"
payload = { "confirm_token": "oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({confirm_token: 'oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg'})
};
fetch('https://api.seesaw.fun/open/v1/orders', 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/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'confirm_token' => 'oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.seesaw.fun/open/v1/orders"
payload := strings.NewReader("{\n \"confirm_token\": \"oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.seesaw.fun/open/v1/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"confirm_token\": \"oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.seesaw.fun/open/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"confirm_token\": \"oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg\"\n}"
response = http.request(request)
puts response.read_body{
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"topic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"option_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stake_coins": "<string>",
"units": "<string>",
"price": "<string>",
"placed_at": "2023-11-07T05:31:56Z"
},
"price_locked": true,
"previewed": {
"units": "<string>",
"price": "<string>"
},
"replayed": true
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}Place the previewed order (step 2 of 2)
Spends 100 coins and opens the position previewed by
/topics/{id}/order-preview. Accepts only the confirm_token.
Requires the write scope; counts against both the write window
(10/min, 200/day) and the read window.
If the 60-second price lock captured at preview is still live the order
fills at the previewed units and price_locked is true. Otherwise it
fills at the current market price — the order is not rejected —
and price_locked is false, with order.units/order.price holding
the actual fill next to the confirmed previewed values. A lock with
under 2 seconds left is treated as expired.
Retrying with the same token returns the original order and
replayed: true. Note that price_locked then describes this
call, not the original fill (whose lock state is not stored) — to
reconcile, compare order.units/order.price against previewed.
curl --request POST \
--url https://api.seesaw.fun/open/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirm_token": "oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg"
}
'import requests
url = "https://api.seesaw.fun/open/v1/orders"
payload = { "confirm_token": "oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({confirm_token: 'oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg'})
};
fetch('https://api.seesaw.fun/open/v1/orders', 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/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'confirm_token' => 'oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.seesaw.fun/open/v1/orders"
payload := strings.NewReader("{\n \"confirm_token\": \"oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.seesaw.fun/open/v1/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"confirm_token\": \"oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.seesaw.fun/open/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"confirm_token\": \"oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg\"\n}"
response = http.request(request)
puts response.read_body{
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"topic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"option_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stake_coins": "<string>",
"units": "<string>",
"price": "<string>",
"placed_at": "2023-11-07T05:31:56Z"
},
"price_locked": true,
"previewed": {
"units": "<string>",
"price": "<string>"
},
"replayed": true
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"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.
Body
The only accepted body of an execute operation. The token comes from the matching preview, is valid 5 minutes and is bound to this user, key, action and parameters.
"oc1.eyJhIjoicGxhY2Vfb3JkZXIi….B7BIlLpN9gqCD8Ug2FcGEg"
Response
The filled order
Show child attributes
Show child attributes
true when the preview's 60-second lock was still live and the fill
matched it. false means the order filled at the market instead.
The numbers the user confirmed, for comparison.
Show child attributes
Show child attributes
true when this token had already been executed and the original order is being returned.