API Reference

Get / Quote (Legacy v1)

Reference for Carbium's legacy v1 provider-specific Quote endpoint. Read the extended guide for request examples, response interpretation, provider-selection context, and migration guidance.

Legacy provider-specific quote. Returns the output amount, minimum output, and price impact for a given input amount routed through a specified DEX provider. For most integrations prefer the Q1 endpoint (/api/v2/quote) which returns the best aggregated route plus an optional executable transaction.

Need a request walkthrough, response explanation, and migration guidance? Read the Legacy v1 Quote Guide.

OpenAPI definition

{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Quote (v1)"
  },
  "servers": [
    {
      "url": "https://api.carbium.io/api/v1"
    }
  ],
  "paths": {
    "/quote": {
      "get": {
        "description": "",
        "operationId": "get_quote_v1",
        "responses": {
          "200": {
            "description": "Successful quote",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "inputMint": {
                          "type": "string",
                          "description": "Input token mint"
                        },
                        "inAmount": {
                          "type": "string",
                          "description": "Input amount in base units (string to preserve u64 precision)"
                        },
                        "outputMint": {
                          "type": "string",
                          "description": "Output token mint"
                        },
                        "outAmount": {
                          "type": "string",
                          "description": "Expected output amount in base units"
                        },
                        "minimumReceived": {
                          "type": "string",
                          "description": "Minimum output after slippage tolerance"
                        },
                        "slippage": {
                          "type": "integer",
                          "description": "Echoed slippage tolerance (BPS)"
                        },
                        "priceImpactPercent": {
                          "type": "string",
                          "description": "Price impact as a percentage string"
                        },
                        "ammKey": {
                          "type": "string",
                          "description": "AMM pool address used for the route"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": true,\n  \"data\": {\n    \"inputMint\": \"So11111111111111111111111111111111111111112\",\n    \"inAmount\": \"100000000\",\n    \"outputMint\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n    \"outAmount\": \"8758732\",\n    \"minimumReceived\": \"8671145\",\n    \"slippage\": 100,\n    \"priceImpactPercent\": \"0.00023524982165301226245\",\n    \"ammKey\": \"58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2\"\n  }\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (invalid params, no route, or sim failure)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "fromMint",
            "schema": {
              "type": "string",
              "default": "So11111111111111111111111111111111111111112"
            },
            "required": true,
            "description": "Input token mint address"
          },
          {
            "in": "query",
            "name": "toMint",
            "schema": {
              "type": "string",
              "default": "AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY"
            },
            "required": true,
            "description": "Output token mint address"
          },
          {
            "in": "query",
            "name": "amount",
            "schema": {
              "type": "integer",
              "default": "100000000"
            },
            "required": true,
            "description": "Input amount (in lamports)"
          },
          {
            "in": "query",
            "name": "slippage",
            "schema": {
              "type": "integer",
              "default": "100"
            },
            "required": true,
            "description": "Slippage tolerance (in BPS)"
          },
          {
            "in": "query",
            "name": "provider",
            "schema": {
              "type": "string",
              "enum": [
                "raydium",
                "raydium-cpmm",
                "orca",
                "meteora",
                "meteora-dlmm",
                "pump-fun",
                "moonshot",
                "stabble",
                "printdex",
                "goosefx"
              ],
              "default": "raydium"
            },
            "required": true,
            "description": "DEX provider to route through"
          },
          {
            "in": "query",
            "name": "pool",
            "schema": {
              "type": "string"
            },
            "description": "Custom pool address for direct routing (optional)"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "security": [
    {
      "apiKey": []
    }
  ]
}