AnyGas Primitives API

Batch / schedule / conditional route primitives (gated, dry-run by default)

Operations 7

POST /api/route/batch Plan a multi-leg payout (gated, dry-run by default) #
POST /api/route/schedule Create a scheduled / recurring transfer (gated) #
GET /api/route/schedule/{id} Inspect a schedule #
DELETE /api/route/schedule/{id} Cancel a schedule #
POST /api/route/conditional Create a trigger-based transfer (gated) #
GET /api/route/conditional/{id} Inspect a condition #
DELETE /api/route/conditional/{id} Cancel a condition #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/anygas-xyz:anygas-xyz-primitives-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

anygas-xyz-primitives-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Anygas Xyz Primitives API
  version: 3.28.2
  contact:
    name: Robyn AnyGas
    url: https://anygas.xyz
  license:
    name: Service terms
    url: https://anygas.xyz/svc/api/terms
  x-lastUpdated: '2026-07-29'
  description: 'Operations tagged primitives across 2 of this provider''s published API definitions: anygas-openapi.json, anygas-xyz-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.anygas.xyz/svc
  description: Production gateway (also https://anygas.xyz/svc)
tags:
- name: primitives
  description: Batch / schedule / conditional route primitives (gated, dry-run by default)
paths:
  /api/route/batch:
    post:
      tags:
      - primitives
      summary: Plan a multi-leg payout (gated, dry-run by default)
      description: Plans a multi-recipient/multi-leg payout (up to 20 legs), each via /compare. Plans & stores only — it does NOT move funds. Execution needs the watcher running with PRIMITIVES_LIVE=1 AND the record carrying live:true; the shipped default (live:false) simulates every tick. Rate limit 30/min.
      operationId: routeBatch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchRequest'
      responses:
        '200':
          description: Planned batch record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchResult'
    servers:
    - url: https://api.anygas.xyz/svc
      description: Production gateway (also https://anygas.xyz/svc)
  /api/route/schedule:
    post:
      tags:
      - primitives
      summary: Create a scheduled / recurring transfer (gated)
      description: Plans & stores a scheduled or recurring transfer. Same double gate as batch (PRIMITIVES_LIVE=1 + live:true); default live:false simulates. Rate limit 30/min.
      operationId: routeSchedule
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleRequest'
      responses:
        '200':
          description: Schedule record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResult'
    servers:
    - url: https://api.anygas.xyz/svc
      description: Production gateway (also https://anygas.xyz/svc)
  /api/route/schedule/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      example: sched_cde9a12f1107fa3652
    get:
      tags:
      - primitives
      summary: Inspect a schedule
      operationId: getSchedule
      responses:
        '200':
          description: Schedule record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResult'
        '404':
          description: Bad schedule path or id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
      - primitives
      summary: Cancel a schedule
      operationId: cancelSchedule
      responses:
        '200':
          description: Cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrimitiveCancelled'
    servers:
    - url: https://api.anygas.xyz/svc
      description: Production gateway (also https://anygas.xyz/svc)
  /api/route/conditional:
    post:
      tags:
      - primitives
      summary: Create a trigger-based transfer (gated)
      description: Plans & stores a trigger-based transfer (priceAbove/priceBelow against on-chain feeds, or timeAfter). Same double gate as batch; default live:false simulates. Rate limit 30/min.
      operationId: routeConditional
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConditionalRequest'
      responses:
        '200':
          description: Conditional record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConditionalResult'
    servers:
    - url: https://api.anygas.xyz/svc
      description: Production gateway (also https://anygas.xyz/svc)
  /api/route/conditional/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      example: cond_3728705d2654926bc1
    get:
      tags:
      - primitives
      summary: Inspect a condition
      operationId: getConditional
      responses:
        '200':
          description: Conditional record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConditionalResult'
        '404':
          description: Bad conditional path or id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
      - primitives
      summary: Cancel a condition
      operationId: cancelConditional
      responses:
        '200':
          description: Cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrimitiveCancelled'
    servers:
    - url: https://api.anygas.xyz/svc
      description: Production gateway (also https://anygas.xyz/svc)
components:
  schemas:
    ConditionalResult:
      type: object
      properties:
        id:
          type: string
          example: cond_3728705d2654926bc1
        route:
          type: object
          additionalProperties: true
        when:
          type: object
          additionalProperties: true
        live:
          type: boolean
          example: false
        status:
          type: string
          example: armed
        runs:
          type: array
          items:
            type: object
            additionalProperties: true
        note:
          type: string
      additionalProperties: true
    Error:
      type: object
      description: Every error carries a stable errorCode plus recovery metadata. The legacy `error` string is retained for backward compatibility - branch on errorCode.
      properties:
        error:
          type: string
          description: human-readable message (legacy field)
        errorCode:
          type: string
          example: INSUFFICIENT_FLOAT
          description: stable machine code; see GET /api/errors for the full catalogue
        retryable:
          type: boolean
        retryAfterMs:
          type: integer
          description: present when the failure is transient
        suggestedAction:
          type: string
          description: what the caller should actually do next
        docs:
          type: string
      required:
      - error
    PrimitiveCancelled:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          example: cancelled
    BatchResult:
      type: object
      properties:
        id:
          type: string
          example: batch_086f0679dfac4a905d
        status:
          type: string
          example: planned
        live:
          type: boolean
          example: false
        legs:
          type: array
          items:
            type: object
            additionalProperties: true
        warnings:
          type: array
          items:
            type: string
        note:
          type: string
      additionalProperties: true
    ScheduleResult:
      type: object
      properties:
        id:
          type: string
          example: sched_cde9a12f1107fa3652
        route:
          type: object
          additionalProperties: true
        everySeconds:
          type: integer
          example: 3600
        remaining:
          type: integer
          example: 24
        count:
          type: integer
          example: 24
        live:
          type: boolean
          example: false
        status:
          type: string
          example: active
        runs:
          type: array
          items:
            type: object
            additionalProperties: true
        note:
          type: string
      additionalProperties: true
    ScheduleRequest:
      type: object
      required:
      - route
      properties:
        route:
          type: object
          additionalProperties: true
          description: A single route object {fromChain,fromToken,toChain,toToken,amount,toAddress}.
        everySeconds:
          type: integer
          minimum: 10
          description: Omit for a one-shot.
        at:
          description: Epoch or ISO time for a one-shot start.
          oneOf:
          - type: string
          - type: integer
        count:
          type: integer
          minimum: 1
          maximum: 1000
        live:
          type: boolean
          default: false
    BatchRequest:
      type: object
      required:
      - routes
      properties:
        routes:
          type: array
          description: Up to 20 legs; toAddress required per leg.
          items:
            type: object
            properties:
              fromChain: {}
              fromToken:
                type: string
              toChain: {}
              toToken:
                type: string
              amount:
                type: string
              toAddress:
                type: string
        live:
          type: boolean
          default: false
          description: Ignored unless the watcher runs with PRIMITIVES_LIVE=1.
    ConditionalRequest:
      type: object
      required:
      - route
      - when
      properties:
        route:
          type: object
          additionalProperties: true
        when:
          type: object
          required:
          - type
          properties:
            type:
              type: string
              enum:
              - priceAbove
              - priceBelow
              - timeAfter
            asset:
              type: string
              description: Required for price conditions, e.g. ETH/USD, BTC/USD, USDG/USD.
              example: ETH/USD
            value:
              description: Numeric price for price conditions; epoch/ISO for timeAfter.
              oneOf:
              - type: number
              - type: string
              example: 3000
        live:
          type: boolean
          default: false
x-refined-from:
- anygas-openapi.json
- anygas-xyz-openapi.json