Skip to main content
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>'
{
  "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
  }
}

Documentation Index

Fetch the complete documentation index at: https://onlytraffic.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-Key
string
header
required

Your API key from the Studio Dashboard

Query Parameters

page
integer
default:1

Page number, 1-indexed.

Required range: x >= 1
page_size
integer
default:50

Items per page. Default 50, max 100.

Required range: 1 <= x <= 100
order_id
string

Filter by exact public id (swpo_xxxxxxx).

offer_id
integer
of_account_id
integer

Match orders where this OF account appears on either side.

role
enum<string>

offer = orders placed against your offers; order = orders you placed.

Available options:
offer,
order
status
enum<string>
Available options:
waiting,
accepted,
rejected,
completed,
cancelled
from
string<date>

Lower bound on the resource date (YYYY-MM-DD, UTC, inclusive).

to
string<date>

Upper bound on the resource date (YYYY-MM-DD, UTC, inclusive).

sort
enum<string>
default:created_at_desc

Sort order.

  • created_at_desc: newest orders first (default).
  • created_at_asc: oldest orders first.
  • completed_at_desc: most recently completed first. NULL completed_at (still running / not completed) always sorts to the bottom regardless of direction.
  • completed_at_asc: earliest completed first. NULL completed_at always at the bottom.
Available options:
created_at_desc,
created_at_asc,
completed_at_desc,
completed_at_asc

Response

Paged list of swap orders.

success
boolean
data
object[]
pagination
object

Page-based pagination, returned by every list endpoint that isn't a cursor feed.