Your swap orders.
curl --request GET \
--url https://studio-api.onlytraffic.com/api/external/v1/swaps/orders \
--header 'X-API-Key: <api-key>'import requests
url = "https://studio-api.onlytraffic.com/api/external/v1/swaps/orders"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://studio-api.onlytraffic.com/api/external/v1/swaps/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://studio-api.onlytraffic.com/api/external/v1/swaps/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://studio-api.onlytraffic.com/api/external/v1/swaps/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://studio-api.onlytraffic.com/api/external/v1/swaps/orders")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio-api.onlytraffic.com/api/external/v1/swaps/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"order_id": "swpo_xxxxxxx",
"offer_id": 123,
"quantity": 123,
"max_days": 123,
"guaranteed_price": 123,
"stats_public_arpu": true,
"is_offer_mine": true,
"is_order_mine": true,
"offer_side": {
"is_mine": true,
"model": {
"of_account_id": 123,
"username": "<string>",
"performer_top": 123,
"subscribe_price": 123
},
"campaign_link": "<string>",
"stats": {
"fans_subscribed": {
"total": 123,
"today": 123
},
"transactions_sum": {
"total": 123,
"today": 123
},
"arpu": 123,
"arpu_paying": 123,
"romi": 123,
"pay_subscribe": {
"total": 123,
"today": 123,
"percent": 123
},
"pay_resubscribe": {
"total": 123,
"today": 123,
"percent": 123
},
"purchases_1": {
"total": 123,
"today": 123,
"percent": 123
},
"purchases_2": {
"total": 123,
"today": 123,
"percent": 123
},
"purchases_5": {
"total": 123,
"today": 123,
"percent": 123
},
"whale": {
"total": 123,
"today": 123,
"percent": 123
},
"messages_3": {
"total": 123,
"today": 123,
"percent": 123
}
}
},
"order_side": {
"is_mine": true,
"model": {
"of_account_id": 123,
"username": "<string>",
"performer_top": 123,
"subscribe_price": 123
},
"campaign_link": "<string>",
"stats": {
"fans_subscribed": {
"total": 123,
"today": 123
},
"transactions_sum": {
"total": 123,
"today": 123
},
"arpu": 123,
"arpu_paying": 123,
"romi": 123,
"pay_subscribe": {
"total": 123,
"today": 123,
"percent": 123
},
"pay_resubscribe": {
"total": 123,
"today": 123,
"percent": 123
},
"purchases_1": {
"total": 123,
"today": 123,
"percent": 123
},
"purchases_2": {
"total": 123,
"today": 123,
"percent": 123
},
"purchases_5": {
"total": 123,
"today": 123,
"percent": 123
},
"whale": {
"total": 123,
"today": 123,
"percent": 123
},
"messages_3": {
"total": 123,
"today": 123,
"percent": 123
}
}
},
"created_at": "2023-11-07T05:31:56Z",
"created_at_ts": 123,
"started_at": "2023-11-07T05:31:56Z",
"started_at_ts": 123,
"completed_at": "2023-11-07T05:31:56Z",
"completed_at_ts": 123
}
],
"pagination": {
"page": 1,
"page_size": 50,
"total": 150,
"total_pages": 3,
"has_next": true
}
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}Swaps
Orders
GET
/
swaps
/
orders
Your swap orders.
curl --request GET \
--url https://studio-api.onlytraffic.com/api/external/v1/swaps/orders \
--header 'X-API-Key: <api-key>'import requests
url = "https://studio-api.onlytraffic.com/api/external/v1/swaps/orders"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://studio-api.onlytraffic.com/api/external/v1/swaps/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://studio-api.onlytraffic.com/api/external/v1/swaps/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://studio-api.onlytraffic.com/api/external/v1/swaps/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://studio-api.onlytraffic.com/api/external/v1/swaps/orders")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio-api.onlytraffic.com/api/external/v1/swaps/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"order_id": "swpo_xxxxxxx",
"offer_id": 123,
"quantity": 123,
"max_days": 123,
"guaranteed_price": 123,
"stats_public_arpu": true,
"is_offer_mine": true,
"is_order_mine": true,
"offer_side": {
"is_mine": true,
"model": {
"of_account_id": 123,
"username": "<string>",
"performer_top": 123,
"subscribe_price": 123
},
"campaign_link": "<string>",
"stats": {
"fans_subscribed": {
"total": 123,
"today": 123
},
"transactions_sum": {
"total": 123,
"today": 123
},
"arpu": 123,
"arpu_paying": 123,
"romi": 123,
"pay_subscribe": {
"total": 123,
"today": 123,
"percent": 123
},
"pay_resubscribe": {
"total": 123,
"today": 123,
"percent": 123
},
"purchases_1": {
"total": 123,
"today": 123,
"percent": 123
},
"purchases_2": {
"total": 123,
"today": 123,
"percent": 123
},
"purchases_5": {
"total": 123,
"today": 123,
"percent": 123
},
"whale": {
"total": 123,
"today": 123,
"percent": 123
},
"messages_3": {
"total": 123,
"today": 123,
"percent": 123
}
}
},
"order_side": {
"is_mine": true,
"model": {
"of_account_id": 123,
"username": "<string>",
"performer_top": 123,
"subscribe_price": 123
},
"campaign_link": "<string>",
"stats": {
"fans_subscribed": {
"total": 123,
"today": 123
},
"transactions_sum": {
"total": 123,
"today": 123
},
"arpu": 123,
"arpu_paying": 123,
"romi": 123,
"pay_subscribe": {
"total": 123,
"today": 123,
"percent": 123
},
"pay_resubscribe": {
"total": 123,
"today": 123,
"percent": 123
},
"purchases_1": {
"total": 123,
"today": 123,
"percent": 123
},
"purchases_2": {
"total": 123,
"today": 123,
"percent": 123
},
"purchases_5": {
"total": 123,
"today": 123,
"percent": 123
},
"whale": {
"total": 123,
"today": 123,
"percent": 123
},
"messages_3": {
"total": 123,
"today": 123,
"percent": 123
}
}
},
"created_at": "2023-11-07T05:31:56Z",
"created_at_ts": 123,
"started_at": "2023-11-07T05:31:56Z",
"started_at_ts": 123,
"completed_at": "2023-11-07T05:31:56Z",
"completed_at_ts": 123
}
],
"pagination": {
"page": 1,
"page_size": 50,
"total": 150,
"total_pages": 3,
"has_next": true
}
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}Authorizations
Your API key from the Studio Dashboard
Query Parameters
Page number, 1-indexed.
Required range:
x >= 1Items per page. Default 50, max 100.
Required range:
1 <= x <= 100Filter by exact public id (swpo_xxxxxxx).
Match orders where this OF account appears on either side.
offer = orders placed against your offers; order = orders you placed.
Available options:
offer, order Available options:
waiting, accepted, rejected, completed, cancelled Lower bound on the resource date (YYYY-MM-DD, UTC, inclusive).
Upper bound on the resource date (YYYY-MM-DD, UTC, inclusive).
Sort order.
created_at_desc: newest orders first (default).created_at_asc: oldest orders first.completed_at_desc: most recently completed first. NULLcompleted_at(still running / not completed) always sorts to the bottom regardless of direction.completed_at_asc: earliest completed first. NULLcompleted_atalways at the bottom.
Available options:
created_at_desc, created_at_asc, completed_at_desc, completed_at_asc Was this page helpful?
⌘I