Skip to Content
Athanor

Published operations

The operation set the SDK ships, per kind. Most integrations never write a query.

The published operations are the API's integration surface: typed documents the SDK ships and registers for you, each selecting what an integration needs and nothing a partner should not see. Write your own only when one of these does not fit, and register it (see Registered documents).

Dealer

OperationScopeWhat it answers
DealerContextanyThe organization the token belongs to: its id and name. Run once, cache.
CataloganyWhat Athanor sells: IRA-eligible bullion by definition, with the BSI and BSI+ codes.
PricingAtDepository(depository, alternatives)anyWhat Athanor sells at right now, per product, at a depository, with the same at the alternatives and which metals' markets are closed. Indicative, never a lock.
ClientsPage(first, after)dealer:clients:readThe holders in the dealer's book, a page at a time.
OrdersFeed(first, after)dealer:orders:readThe organization's orders, newest first, a page at a time, each as the full record.
OrderStatus(id)dealer:orders:readOne order's record by its global id: what a webhook names.
DraftOrder(input)dealer:orders:writeA client, an account and a depository make an order.
AdvanceOrder(input)dealer:orders:writeOne step of the order's machine, named by the record's nextSteps. See The order's machine.
Webhooks / RegisterWebhook / VerifyWebhook / RemoveWebhookdealer:webhooks:manageThe endpoints the organization registered, and their lifecycle. See Webhooks.
Workload / RegisterDocument / SetDocumentModeanyThe client's registered documents and mode. See Registered documents.

Custodian

OperationScopeWhat it answers
CustodianOrdersFeed(first, after)custodian:orders:readThe orders the custodian holds the account for, newest first, as the custodian may read them: standing, funding instructions, delivery evidence, the authorization and its lock snapshot.
CustodianOrder(id)custodian:orders:readOne such order by its global id.

A custodian's record is a different type from the dealer's, CustodianOrder, with the custodian's facts (what to pay, to where, by when; what evidence of delivery exists) and none of the dealer's economics beyond the all-in and its split.

The order record

Every dealer operation that returns an order returns the same fragment, OrderRecord: identity and reference, status and settlementStep, nextDeadlineAt, the depository and budget, the lines with their indicative and locked unit prices, and one object per stage of the life it has reached, direction, lock, funding, release, delivery, cancellation, each null until it has. nextSteps names the steps that are legal right now.

query OrderStatus($id: ID!) {
  node(id: $id) {
    ... on Order {
      ...OrderRecord
    }
  }
}

Pagination

Every list of nodes is a Relay connection: first and after forward, last and before back, pageInfo { hasNextPage endCursor }, totalCount. Pass first explicitly; the default budget assumes 50 where you do not say (see Budgets).

Reading the schema

The full SDL is on the Schema page, and __schema introspection works on sandbox for an explorer. Types are nullable where a read can be refused at that field, so a scope the token lacks nulls the field and names itself in errors while the rest of the document answers.

On this page