Api Endpoint

Pre-Trade Execution Gate

Check execution risk before placing a crypto trade. Submit a visible order book, trade side and notional; receive PASS, CAUTION or AVOID with estimated slippage, spread, fill ratio, visible liquidity and depth utilization. Built for autonomous trading agents that need a fast pre-trade liquidity and execution-risk check. Read-only: never places orders, accesses exchange accounts or gives investment advice.

Open interactive test console

Offering

Provider
api.tradebot.devs.surf
Method
POST
Offering type
Api Endpoint
Transport type
http
Category
Security
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://api.tradebot.devs.surf/v1/pre-trade-execution-gate
MIME type
Not provided
First seen
2026-10-16T03:16:23.012Z
Last seen
Tags
pre-trade, execution-risk, slippage, Liquidity, trading-agents

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.02 USDC
Atomic price: 20000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "20000",
    "payTo": "0x1bdd0cf6c2457765afeb717bc1e5d74b27d45a0f"
  }
]

Observed health

Status
Reachable
Latest latency
306 ms
Average latency
734 ms
HTTP status
405
Last checked
Reachability
100% over 14 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "additionalProperties": false,
  "properties": {
    "body": {
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "properties": {
              "asset": {
                "const": "BTC"
              }
            },
            "required": [
              "asset"
            ]
          },
          "then": {
            "properties": {
              "book": {
                "properties": {
                  "symbol": {
                    "const": "BTCUSDT"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "asset": {
                "const": "ETH"
              }
            },
            "required": [
              "asset"
            ]
          },
          "then": {
            "properties": {
              "book": {
                "properties": {
                  "symbol": {
                    "const": "ETHUSDT"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "asset": {
                "const": "BNB"
              }
            },
            "required": [
              "asset"
            ]
          },
          "then": {
            "properties": {
              "book": {
                "properties": {
                  "symbol": {
                    "const": "BNBUSDT"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "asset": {
                "const": "SOL"
              }
            },
            "required": [
              "asset"
            ]
          },
          "then": {
            "properties": {
              "book": {
                "properties": {
                  "symbol": {
                    "const": "SOLUSDT"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "asset": {
                "const": "XRP"
              }
            },
            "required": [
              "asset"
            ]
          },
          "then": {
            "properties": {
              "book": {
                "properties": {
                  "symbol": {
                    "const": "XRPUSDT"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "asset": {
                "const": "DOGE"
              }
            },
            "required": [
              "asset"
            ]
          },
          "then": {
            "properties": {
              "book": {
                "properties": {
                  "symbol": {
                    "const": "DOGEUSDT"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "asset": {
                "const": "ADA"
              }
            },
            "required": [
              "asset"
            ]
          },
          "then": {
            "properties": {
              "book": {
                "properties": {
                  "symbol": {
                    "const": "ADAUSDT"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "asset": {
                "const": "LINK"
              }
            },
            "required": [
              "asset"
            ]
          },
          "then": {
            "properties": {
              "book": {
                "properties": {
                  "symbol": {
                    "const": "LINKUSDT"
                  }
                }
              }
            }
          }
        }
      ],
      "properties": {
        "asset": {
          "enum": [
            "BTC",
            "ETH",
            "BNB",
            "SOL",
            "XRP",
            "DOGE",
            "ADA",
            "LINK"
          ],
          "title": "Asset",
          "type": "string"
        },
        "book": {
          "additionalProperties": false,
          "properties": {
            "asks": {
              "items": {
                "items": {
                  "type": "number"
                },
                "minItems": 2,
                "prefixItems": [
                  {
                    "exclusiveMinimum": 0,
                    "type": "number"
                  },
                  {
                    "exclusiveMinimum": 0,
                    "type": "number"
                  }
                ],
                "type": "array"
              },
              "minItems": 25,
              "title": "Asks",
              "type": "array"
            },
            "bids": {
              "items": {
                "items": {
                  "type": "number"
                },
                "minItems": 2,
                "prefixItems": [
                  {
                    "exclusiveMinimum": 0,
                    "type": "number"
                  },
                  {
                    "exclusiveMinimum": 0,
                    "type": "number"
                  }
                ],
                "type": "array"
              },
              "minItems": 25,
              "title": "Bids",
              "type": "array"
            },
            "symbol": {
              "title": "Symbol",
              "type": "string"
            }
          },
          "required": [
            "symbol",
            "bids",
            "asks"
          ],
          "title": "ExecutionBook",
          "type": "object"
        },
        "caller_data": {
          "const": true,
          "title": "Caller Data",
          "type": "boolean"
        },
        "notional_usd": {
          "maximum": 1000000,
          "minimum": 10,
          "title": "Notional Usd",
          "type": "number"
        },
        "provenance": {
          "additionalProperties": false,
          "properties": {
            "caller_authorized_use": {
              "const": true,
              "title": "Caller Authorized Use",
              "type": "boolean"
            },
            "latest_data_at": {
              "format": "date-time",
              "pattern": "Z$",
              "title": "Latest Data At",
              "type": "string"
            },
            "source_label": {
              "maxLength": 120,
              "minLength": 1,
              "pattern": "^[^\\x00-\\x1F]*[^\\s\\x00-\\x1F][^\\x00-\\x1F]*$",
              "title": "Source Label",
              "type": "string"
            }
          },
          "required": [
            "source_label",
            "latest_data_at",
            "caller_authorized_use"
          ],
          "title": "ExecutionProvenance",
          "type": "object"
        },
        "side": {
          "enum": [
            "buy",
            "sell"
          ],
          "title": "Side",
          "type": "string"
        }
      },
      "required": [
        "asset",
        "side",
        "notional_usd",
        "caller_data",
        "provenance",
        "book"
      ],
      "title": "ExecutionRiskRequest",
      "type": "object"
    },
    "bodyType": {
      "enum": [
        "json",
        "form-data",
        "text"
      ],
      "type": "string"
    },
    "method": {
      "enum": [
        "POST",
        "PUT",
        "PATCH"
      ],
      "type": "string"
    },
    "type": {
      "const": "http",
      "type": "string"
    }
  },
  "required": [
    "type",
    "method",
    "bodyType",
    "body"
  ],
  "type": "object"
}

Output schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "body": {
          "additionalProperties": false,
          "allOf": [
            {
              "if": {
                "properties": {
                  "asset": {
                    "const": "BTC"
                  }
                },
                "required": [
                  "asset"
                ]
              },
              "then": {
                "properties": {
                  "book": {
                    "properties": {
                      "symbol": {
                        "const": "BTCUSDT"
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "asset": {
                    "const": "ETH"
                  }
                },
                "required": [
                  "asset"
                ]
              },
              "then": {
                "properties": {
                  "book": {
                    "properties": {
                      "symbol": {
                        "const": "ETHUSDT"
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "asset": {
                    "const": "BNB"
                  }
                },
                "required": [
                  "asset"
                ]
              },
              "then": {
                "properties": {
                  "book": {
                    "properties": {
                      "symbol": {
                        "const": "BNBUSDT"
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "asset": {
                    "const": "SOL"
                  }
                },
                "required": [
                  "asset"
                ]
              },
              "then": {
                "properties": {
                  "book": {
                    "properties": {
                      "symbol": {
                        "const": "SOLUSDT"
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "asset": {
                    "const": "XRP"
                  }
                },
                "required": [
                  "asset"
                ]
              },
              "then": {
                "properties": {
                  "book": {
                    "properties": {
                      "symbol": {
                        "const": "XRPUSDT"
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "asset": {
                    "const": "DOGE"
                  }
                },
                "required": [
                  "asset"
                ]
              },
              "then": {
                "properties": {
                  "book": {
                    "properties": {
                      "symbol": {
                        "const": "DOGEUSDT"
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "asset": {
                    "const": "ADA"
                  }
                },
                "required": [
                  "asset"
                ]
              },
              "then": {
                "properties": {
                  "book": {
                    "properties": {
                      "symbol": {
                        "const": "ADAUSDT"
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "asset": {
                    "const": "LINK"
                  }
                },
                "required": [
                  "asset"
                ]
              },
              "then": {
                "properties": {
                  "book": {
                    "properties": {
                      "symbol": {
                        "const": "LINKUSDT"
                      }
                    }
                  }
                }
              }
            }
          ],
          "properties": {
            "asset": {
              "enum": [
                "BTC",
                "ETH",
                "BNB",
                "SOL",
                "XRP",
                "DOGE",
                "ADA",
                "LINK"
              ],
              "title": "Asset",
              "type": "string"
            },
            "book": {
              "additionalProperties": false,
              "properties": {
                "asks": {
                  "items": {
                    "items": {
                      "type": "number"
                    },
                    "minItems": 2,
                    "prefixItems": [
                      {
                        "exclusiveMinimum": 0,
                        "type": "number"
                      },
                      {
                        "exclusiveMinimum": 0,
                        "type": "number"
                      }
                    ],
                    "type": "array"
                  },
                  "minItems": 25,
                  "title": "Asks",
                  "type": "array"
                },
                "bids": {
                  "items": {
                    "items": {
                      "type": "number"
                    },
                    "minItems": 2,
                    "prefixItems": [
                      {
                        "exclusiveMinimum": 0,
                        "type": "number"
                      },
                      {
                        "exclusiveMinimum": 0,
                        "type": "number"
                      }
                    ],
                    "type": "array"
                  },
                  "minItems": 25,
                  "title": "Bids",
                  "type": "array"
                },
                "symbol": {
                  "title": "Symbol",
                  "type": "string"
                }
              },
              "required": [
                "symbol",
                "bids",
                "asks"
              ],
              "title": "ExecutionBook",
              "type": "object"
            },
            "caller_data": {
              "const": true,
              "title": "Caller Data",
              "type": "boolean"
            },
            "notional_usd": {
              "maximum": 1000000,
              "minimum": 10,
              "title": "Notional Usd",
              "type": "number"
            },
            "provenance": {
              "additionalProperties": false,
              "properties": {
                "caller_authorized_use": {
                  "const": true,
                  "title": "Caller Authorized Use",
                  "type": "boolean"
                },
                "latest_data_at": {
                  "format": "date-time",
                  "pattern": "Z$",
                  "title": "Latest Data At",
                  "type": "string"
                },
                "source_label": {
                  "maxLength": 120,
                  "minLength": 1,
                  "pattern": "^[^\\x00-\\x1F]*[^\\s\\x00-\\x1F][^\\x00-\\x1F]*$",
                  "title": "Source Label",
                  "type": "string"
                }
              },
              "required": [
                "source_label",
                "latest_data_at",
                "caller_authorized_use"
              ],
              "title": "ExecutionProvenance",
              "type": "object"
            },
            "side": {
              "enum": [
                "buy",
                "sell"
              ],
              "title": "Side",
              "type": "string"
            }
          },
          "required": [
            "asset",
            "side",
            "notional_usd",
            "caller_data",
            "provenance",
            "book"
          ],
          "title": "ExecutionRiskRequest",
          "type": "object"
        },
        "bodyType": {
          "enum": [
            "json",
            "form-data",
            "text"
          ],
          "type": "string"
        },
        "method": {
          "enum": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "type": "string"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method",
        "bodyType",
        "body"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "additionalProperties": false,
          "properties": {
            "asset": {
              "type": "string"
            },
            "avg_fill_price": {
              "type": "number"
            },
            "capability": {
              "const": "pre_trade_execution_gate",
              "type": "string"
            },
            "decision": {
              "enum": [
                "PASS",
                "CAUTION",
                "AVOID"
              ],
              "type": "string"
            },
            "decision_scope": {
              "const": "visible_orderbook_execution_admissibility_only",
              "type": "string"
            },
            "depth_utilization_ratio": {
              "type": "number"
            },
            "disclaimer": {
              "type": "string"
            },
            "execution_authorized": {
              "const": false,
              "type": "boolean"
            },
            "execution_risk_level": {
              "enum": [
                "low",
                "moderate",
                "high",
                "insufficient_depth"
              ],
              "type": "string"
            },
            "fill_ratio": {
              "type": "number"
            },
            "full_fill": {
              "type": "boolean"
            },
            "limitations": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "market_type": {
              "const": "caller_supplied_visible_orderbook",
              "type": "string"
            },
            "policy": {
              "additionalProperties": false,
              "properties": {
                "mapping": {
                  "additionalProperties": false,
                  "properties": {
                    "high": {
                      "const": "AVOID",
                      "type": "string"
                    },
                    "insufficient_depth": {
                      "const": "AVOID",
                      "type": "string"
                    },
                    "low": {
                      "const": "PASS",
                      "type": "string"
                    },
                    "moderate": {
                      "const": "CAUTION",
                      "type": "string"
                    }
                  },
                  "required": [
                    "low",
                    "moderate",
                    "high",
                    "insufficient_depth"
                  ],
                  "type": "object"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "version",
                "mapping"
              ],
              "type": "object"
            },
            "reason": {
              "type": "string"
            },
            "requested_notional_usd": {
              "type": "number"
            },
            "runtime_permission": {
              "const": "NO",
              "type": "string"
            },
            "side": {
              "enum": [
                "buy",
                "sell"
              ],
              "type": "string"
            },
            "slippage_bps": {
              "type": "number"
            },
            "source": {
              "additionalProperties": false,
              "properties": {
                "caller_authorized_use": {
                  "const": true,
                  "type": "boolean"
                },
                "depth_levels": {
                  "minimum": 25,
                  "type": "integer"
                },
                "endpoint": {
                  "const": "caller_payload",
                  "type": "string"
                },
                "observed_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "provider": {
                  "const": "caller_supplied",
                  "type": "string"
                },
                "source_label": {
                  "maxLength": 120,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "provider",
                "endpoint",
                "observed_at",
                "depth_levels",
                "source_label",
                "caller_authorized_use"
              ],
              "type": "object"
            },
            "spread_bps": {
              "type": "number"
            },
            "status": {
              "const": "OK",
              "type": "string"
            },
            "symbol": {
              "type": "string"
            },
            "venue": {
              "const": "caller_supplied",
              "type": "string"
            },
            "visible_side_depth_usd": {
              "type": "number"
            },
            "worst_fill_price": {
              "type": "number"
            }
          },
          "required": [
            "status",
            "capability",
            "decision",
            "decision_scope",
            "reason",
            "asset",
            "symbol",
            "venue",
            "market_type",
            "side",
            "requested_notional_usd",
            "full_fill",
            "fill_ratio",
            "spread_bps",
            "slippage_bps",
            "avg_fill_price",
            "worst_fill_price",
            "visible_side_depth_usd",
            "depth_utilization_ratio",
            "execution_risk_level",
            "source",
            "policy",
            "execution_authorized",
            "limitations",
            "disclaimer",
            "runtime_permission"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}