API Reference

Get / All Quote

Reference for Carbium's legacy v1 All Quote endpoint. Read the extended guide for provider comparison, route-miss handling, and transaction-path guidance.

Returns the quote of all providers for the given details.

Need request examples, route-miss handling, and transaction-path guidance? Read the Legacy v1 All Quote Guide.

OpenAPI definition

{
  "openapi": "3.1.0",
  "info": {
    "title": "swap",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.carbium.io/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/quote/all": {
      "get": {
        "summary": "Get / All Quote",
        "description": "Returns the quote of all providers for the given details.",
        "operationId": "get-all-quote",
        "parameters": [
          {
            "name": "fromMint",
            "in": "query",
            "description": "Address of the token that is used buy the other token",
            "required": true,
            "schema": {
              "type": "string",
              "default": "So11111111111111111111111111111111111111112"
            }
          },
          {
            "name": "toMint",
            "in": "query",
            "description": "Receiving Address of token",
            "required": true,
            "schema": {
              "type": "string",
              "default": "AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY"
            }
          },
          {
            "name": "amount",
            "in": "query",
            "description": "Swap amount (in lamports)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100000000
            }
          },
          {
            "name": "slippage",
            "in": "query",
            "description": "Slippage Value (in BPS)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "{\n  success: true,\n  data: 'AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABD0HvgDTnMj7oCb7XRWjr8EcqwXoiQHmn/ZVj61zjfisGtMf2Efd0X1fBj+G9OM4t0DxYdiHukzsQoBixkMgGgAIACBDrHlujzDywOvtL/aA7nvfdqMa9N/GtqQh0drycpfGTfamE39H++vZd2nBM3mx0lJGFbp2zz7AuLkLXKUETnjuzGS6ZKuy9BQlCZgJCc/q9AamonfXyOdKBm+O7fq0xtHov7jPq31TYjNawXQqY9/kn37kPyaqH38oxeV0y9qCw8kXxBlEoW1obhUfQ52BC3j+fZe6i2A829rXSxqagK+nFiBGb5YUGf5F9G9ATB0zJh1LP+QM/rS4rNBjnjBuL1TLLc9Z7V0rHQRDiYePSm+Y6Fs40YRb6dVhQL0/bF+hP46vwexAnYKCEOQRVEUO0d1oh9AaSJMetxLID3/q2+A3MAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCpBpuIV/6rgYT7aH9jRhjANdrEOdwa6ztVmKDwAAAAAAEGp9UXGSxcUSGMyUw9SvF/WNruCJuh/UTj29mKAAAAAAaAo0GTptWCcA0dSN8JbZpBt0pqhaNAZYObuE0YtGA7DgNoX46QpFPkWBIcZvWnau3HcGqhHIL4qpUqjyt4ealeuOomIkw9NsPobNo9lNT9km+OLGWDzci5Ykc6xb8hSmxupNjeYPwIixlRUhC6hnasX5VYV1KMzrqlfj1Z77oVBggABQKagQEACAAJA0BCDwAAAAAACQIAAgwCAAAAIKEHAAAAAAAJAgABNAAAAACQpCAAAAAAAKUAAAAAAAAABt324ddloZPZy+FGzut5rBy0he1fWzeROoz1hX7/AKkKBAELAAwBAQ0MDgoAAwEEBQYHBwcPNvjGnpHhdYfIKgAAAPjGnpHhdYfIoIYBAAAAAAChEgAAAAAAAFA7AQABAAAAAAAAAAAAAAABAQA='\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "{ error: { message: 'No pool found' } }"
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "{ error: { message: 'API Key not found' } }"
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}