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. OverridesupportedChainsonly if your o1 deployment has different chain coverage. - spanDEX calls o1's
/executeendpoint so returned quotes include broadcast-ready calldata. - o1 uses one
uservalue for the transaction sender and recipient. Quotes with a separaterecipientAccountare rejected by the adapter. - The adapter does not advertise integrator fee support by default because
o1 accepts
feeBpsbut not a per-request fee recipient. Only enablenegotiatedFeatures: ["integratorFees"]for deployments with fee recipient handling configured server-side.