{ "openapi": "3.1.0", "info": { "title": "BOB Gateway API", "description": "BOB Gateway API for Bitcoin swaps", "license": { "name": "" }, "version": "1.0.0" }, "servers": [ { "url": "https://gateway-api-mainnet.gobob.xyz", "description": "Production" }, { "url": "https://gateway-api-staging.gobob.xyz", "description": "Staging" } ], "paths": { "/v1/create-order": { "post": { "tags": [ "v1" ], "summary": "Create a new gateway order.", "description": "Creates a new request, reserves the required liquidity.", "operationId": "create_order", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayQuote" } } }, "required": true }, "responses": { "201": { "description": "Created order", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayCreateOrder" } } } }, "400": { "description": "Create order error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayError" } } } } }, "deprecated": true, "security": [ { "api_key": [] } ] } }, "/v1/get-max-spendable/{address}": { "get": { "tags": [ "v1" ], "operationId": "get_max_spendable", "parameters": [ { "name": "address", "in": "path", "description": "Bitcoin address to calculate the maximum spendable amount for", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Get the maximum spendable Bitcoin amount for the given address after accounting for estimated transaction fees", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayMaxSpendable" } } } }, "400": { "description": "Get max spendable error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayError" } } } } }, "deprecated": true, "security": [ { "api_key": [] } ] } }, "/v1/get-order/{id}": { "get": { "tags": [ "v1" ], "summary": "Get all orders for a specific ID.", "operationId": "get_order", "parameters": [ { "name": "id", "in": "path", "description": "Order identifier: either the order_id returned by create-order, the source Bitcoin transaction ID , or the source EVM transaction hash", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Get order by either the order_id returned by create-order, the source Bitcoin transaction ID , or the source EVM transaction hash", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayOrderInfo" } } } }, "400": { "description": "Invalid order ID", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayError" } } } }, "404": { "description": "Order not found" } }, "deprecated": true, "security": [ { "api_key": [] } ] } }, "/v1/get-orders/{user_address}": { "get": { "tags": [ "v1" ], "summary": "Get all user orders.", "operationId": "get_orders", "parameters": [ { "name": "user_address", "in": "path", "description": "User address", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Get all orders", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GatewayOrderInfo" } } } } }, "400": { "description": "Invalid user address", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayError" } } } } }, "deprecated": true, "security": [ { "api_key": [] } ] } }, "/v1/get-quote": { "get": { "tags": [ "v1" ], "summary": "Get a gateway quote.", "description": "Checks the available liquidity and provides a quote.", "operationId": "get_quote", "parameters": [ { "name": "srcChain", "in": "query", "description": "Source chain", "required": true, "schema": { "type": "string" }, "style": "form", "example": "bitcoin" }, { "name": "dstChain", "in": "query", "description": "Destination chain", "required": true, "schema": { "type": "string" }, "style": "form", "example": "ethereum" }, { "name": "sender", "in": "query", "description": "Address sending the funds", "required": false, "schema": { "type": "string" }, "style": "form", "example": "bc1qyhc4uslh46axl553pq3mjclrt7dcgmlzxv0ktx" }, { "name": "recipient", "in": "query", "description": "Address receiving the funds", "required": true, "schema": { "type": "string" }, "style": "form", "example": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" }, { "name": "srcToken", "in": "query", "description": "Source token address", "required": true, "schema": { "type": "string" }, "style": "form", "example": "0x0000000000000000000000000000000000000000" }, { "name": "dstToken", "in": "query", "description": "Destination token address", "required": true, "schema": { "type": "string" }, "style": "form", "example": "0xdAC17F958D2ee523a2206206994597C13D831ec7" }, { "name": "amount", "in": "query", "description": "Amount to swap (in smallest unit, e.g., sats or wei)", "required": true, "schema": { "type": "string" }, "style": "form", "example": "100000" }, { "name": "gasRefill", "in": "query", "description": "Deprecated: gas refill is no longer supported. Supplying this field is\nrejected with an error. Removed in V3.", "required": false, "schema": { "type": "string" }, "style": "form" }, { "name": "slippage", "in": "query", "description": "Slippage tolerance (in basis points, e.g., 300 = 3%)", "required": true, "schema": { "type": "string" }, "style": "form", "example": "300" }, { "name": "strategyTarget", "in": "query", "description": "Deprecated: custom strategies are no longer supported. Supplying this\nfield is rejected with an error. Removed in V3.", "required": false, "schema": { "type": "string" }, "style": "form" }, { "name": "strategyMessage", "in": "query", "description": "Deprecated: custom strategies are no longer supported. Supplying this\nfield is rejected with an error. Removed in V3.", "required": false, "schema": { "type": "string" }, "style": "form" }, { "name": "affiliateId", "in": "query", "description": "Optional affiliate ID", "required": false, "schema": { "type": "string" }, "style": "form" } ], "responses": { "200": { "description": "Get a quote", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayQuote" } } } }, "400": { "description": "Get a quote error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayError" } } } } }, "deprecated": true, "security": [ { "api_key": [] } ] } }, "/v1/get-routes": { "get": { "tags": [ "v1" ], "summary": "Get all supported routes.", "operationId": "get_routes", "responses": { "200": { "description": "Get all supported routes", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RouteInfo" } } } } } }, "deprecated": true, "security": [ { "api_key": [] } ] } }, "/v1/register-tx": { "patch": { "tags": [ "v1" ], "summary": "Register a tx for a request.", "description": "Required for the Solver to track and execute some requests.", "operationId": "register_tx", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterTx" } } }, "required": true }, "responses": { "200": { "description": "Register successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterTxSuccess" } } } }, "400": { "description": "Register error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayError" } } } } }, "deprecated": true, "security": [ { "api_key": [] } ] } }, "/v2/create-order": { "post": { "tags": [ "v2" ], "summary": "Create a new gateway order.", "description": "Creates a new request, reserves the required liquidity.", "operationId": "create_order_v2", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayQuoteV2" } } }, "required": true }, "responses": { "201": { "description": "Created order", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayCreateOrderV2" } } } }, "400": { "description": "Create order error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayErrorV2" } } } } } } }, "/v2/get-max-spendable/{address}": { "get": { "tags": [ "v2" ], "summary": "Get the maximum spendable Bitcoin amount for the given address (v2).", "operationId": "get_max_spendable_v2", "parameters": [ { "name": "address", "in": "path", "description": "Bitcoin address to calculate the maximum spendable amount for", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Get the maximum spendable Bitcoin amount for the given address after accounting for estimated transaction fees", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayMaxSpendable" } } } }, "400": { "description": "Get max spendable error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayErrorV2" } } } } }, "security": [ { "api_key": [] } ] } }, "/v2/get-order/{id}": { "get": { "tags": [ "v2" ], "summary": "Get an order by id (v2).", "operationId": "get_order_v2", "parameters": [ { "name": "id", "in": "path", "description": "Order identifier: either the order_id returned by create-order, the source Bitcoin transaction ID , or the source EVM transaction hash", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Get order by either the order_id returned by create-order, the source Bitcoin transaction ID , or the source EVM transaction hash", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayOrderInfoV2" } } } }, "400": { "description": "Invalid order ID", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayErrorV2" } } } }, "404": { "description": "Order not found" } }, "security": [ { "api_key": [] } ] } }, "/v2/get-orders/{user_address}": { "get": { "tags": [ "v2" ], "summary": "Get user orders (v2).", "operationId": "get_orders_v2", "parameters": [ { "name": "user_address", "in": "path", "description": "User address", "required": true, "schema": { "type": "string" } }, { "name": "cursor", "in": "query", "description": "Cursor used to fetch the next page, obtained from the response's `next_cursor`.", "required": false, "schema": { "type": "string" }, "style": "form" }, { "name": "limit", "in": "query", "description": "Number of orders to request", "required": false, "schema": { "type": "integer", "minimum": 1 }, "style": "form" } ], "responses": { "200": { "description": "Get orders", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedOrdersResponse" } } } }, "400": { "description": "Invalid user address", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayErrorV2" } } } } }, "security": [ { "api_key": [] } ] } }, "/v2/get-quote": { "get": { "tags": [ "v2" ], "summary": "Get a gateway quote.", "description": "Checks the available liquidity and provides a quote.", "operationId": "get_quote_v2", "parameters": [ { "name": "srcChain", "in": "query", "description": "Source chain", "required": true, "schema": { "type": "string" }, "style": "form", "example": "bitcoin" }, { "name": "dstChain", "in": "query", "description": "Destination chain", "required": true, "schema": { "type": "string" }, "style": "form", "example": "ethereum" }, { "name": "sender", "in": "query", "description": "Address sending the funds", "required": false, "schema": { "type": "string" }, "style": "form", "example": "bc1qyhc4uslh46axl553pq3mjclrt7dcgmlzxv0ktx" }, { "name": "recipient", "in": "query", "description": "Address receiving the funds", "required": true, "schema": { "type": "string" }, "style": "form", "example": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" }, { "name": "srcToken", "in": "query", "description": "Source token address", "required": true, "schema": { "type": "string" }, "style": "form", "example": "0x0000000000000000000000000000000000000000" }, { "name": "dstToken", "in": "query", "description": "Destination token address", "required": true, "schema": { "type": "string" }, "style": "form", "example": "0xdAC17F958D2ee523a2206206994597C13D831ec7" }, { "name": "amount", "in": "query", "description": "Amount to swap (in smallest unit, e.g., sats or wei)", "required": true, "schema": { "type": "string" }, "style": "form", "example": "100000" }, { "name": "gasRefill", "in": "query", "description": "Deprecated: gas refill is no longer supported. Supplying this field is\nrejected with an error. Removed in V3.", "required": false, "schema": { "type": "string" }, "style": "form" }, { "name": "slippage", "in": "query", "description": "Slippage tolerance (in basis points, e.g., 300 = 3%)", "required": true, "schema": { "type": "string" }, "style": "form", "example": "300" }, { "name": "strategyTarget", "in": "query", "description": "Deprecated: custom strategies are no longer supported. Supplying this\nfield is rejected with an error. Removed in V3.", "required": false, "schema": { "type": "string" }, "style": "form" }, { "name": "strategyMessage", "in": "query", "description": "Deprecated: custom strategies are no longer supported. Supplying this\nfield is rejected with an error. Removed in V3.", "required": false, "schema": { "type": "string" }, "style": "form" }, { "name": "affiliates", "in": "query", "description": "Comma-separated list of `
: