---
title: "Debug TP/SL orders"
method: GET
path: "/admin/tpsl/debug"
tags: ["Admin"]
---

# Debug TP/SL orders

`GET /admin/tpsl/debug`

## Request

- Base URL: `https://api.testnet.rise.trade`
- URL: `https://api.testnet.rise.trade/admin/tpsl/debug`
- Auth: none required
- TypeScript: <https://skmtc.dev/rise/apis/risex-rest-api/docs/admin/tpsl/debug/get.ts> (a function with typed inputs; its response is checked against the schema)

Debug a TP/SL order end to end: returns every tpsl_orders field plus the actual fill (execution price, filled size, filled time, fill status, slippage) joined from matches. All filters are optional and AND-combined.

## Query parameters

- `account` string
- `market_id` string, int64
- `stop_type` string
- `status` string
- `trigger_price_min` string
- `trigger_price_max` string
- `order_id` string
- `start_time` string, uint64
- `end_time` string, uint64

## Response `200`

A successful response.

- ApiDebugTpslOrdersResponse
  - `order` ApiDebugTpslOrder: Full TP/SL order detail plus the actual on-chain fills from matches.
    - `order_id` string
    - `account` string
    - `market_id` string, uint64
    - `side` string
    - `size` string
    - `stop_type` string
    - `order_type` string
    - `stop_price` string
    - `limit_price` string
    - `stop_price_option` string
    - `status` string
    - `tif` string
    - `created_at` string, int64
    - `expires_at` string, int64
    - `triggered_at` string, int64
    - `triggered_price` string
    - `trigger_tx_hash` string
    - `triggered_tx_hash` string
    - `triggered_order_id` string
    - `cancel_reason` string
    - `cancelled_at` string, int64
    - `trigger_attempts` integer
    - `last_trigger_attempt` string, int64
    - `execution_price` string: volume-weighted avg fill price (human decimal)
    - `filled_size` string
    - `filled_at` string, int64
    - `fill_status` string
    - `slippage_bps` string
    - `adverse_slippage_bps` string
    - `triggered_block_number` string, int64: block of the phantom execution (0 if none)
    - `triggered_log_index` string, int64
    - `matches` ApiDebugTpslMatch[]
      - `tx_hash` string
      - `block_number` string, int64
      - `log_index` string, int64
      - `match_index` string, int64
      - `block_ts` string, int64
      - `matched_price` string
      - `matched_size` string
      - `fee` string
      - `accumulated_funding_payment` string
      - `is_liquidation` boolean
    - `triggered_order` ApiDebugTriggeredOrder: Terminal on-chain order row (from the `orders` table, which holds only filled/cancelled orders). Keyed by orders.wide_order_id == tpsl_orders.triggered_order_id.
      - `wide_order_id` string
      - `status` string
      - `tif` string
      - `filled_size` string
      - `avg_filled_price` string
      - `cancel_reason` string
      - `cancel_tx_hash` string
      - `tx_hash` string
      - `block_number` string, int64
      - `created_at` string, int64

## Other responses

- `default`: An unexpected error response.

## Changes

- **2026-11-03** `98eabcd6a6ad`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rise/apis/risex-rest-api/changes/admin/tpsl/debug/get.md)

---

[API](https://skmtc.dev/rise/apis/risex-rest-api.md) - [All operations](https://skmtc.dev/rise/apis/risex-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rise/apis/risex-rest-api/revisions/98eabcd6a6ad?raw)
