Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

o1

Configuration

import { createConfig, o1 } from "@spandex/core";
 
export const config = createConfig({
  providers: [
    o1({
      baseUrl: "https://api.example.com",
      apiKey: "YOUR_O1_API_KEY",
      // Optional. Defaults to Base.
      supportedChains: [8453],
    }),
    // ...
  ],
});

Notes

  • The adapter defaults to Base (8453), matching the public o1 DEX Aggregator API. Override supportedChains only if your o1 deployment has different chain coverage.
  • spanDEX calls o1's /execute endpoint so returned quotes include broadcast-ready calldata.
  • o1 uses one user value for the transaction sender and recipient. Quotes with a separate recipientAccount are rejected by the adapter.
  • The adapter does not advertise integrator fee support by default because o1 accepts feeBps but not a per-request fee recipient. Only enable negotiatedFeatures: ["integratorFees"] for deployments with fee recipient handling configured server-side.