DEVELOPERS

API

The API the website uses, and the contracts on each network.

Versioned REST API with OpenAPI documentation at https://api.olinx.io/v1/docs. Public reads need no sign-in; private reads use an EIP-4361 wallet session; every mutation needs an Idempotency-Key.

  • GET /v1/offers — order book (confirmed remaining, pending, available)
  • POST /v1/offers/drafts — validated approve + the vault's place transactions
  • POST /v1/offers/:id/take-attempts — validated approve + take with exact payment
  • POST /v1/offers/:id/cancel-attempts — validated vault cancel for the order's holder
  • POST /v1/orders/:id/send-attempts, POST /v1/orders/:id/receiver-attempts — the holder sends the order's NFT, or changes who is paid for its fills
  • GET /v1/orders/check — whether an NFT is a real OLinx order or trade receipt, and what is left in it
  • GET /v1/orders/nft/:chainId/:tokenId, GET /v1/trades/nft/:chainId/:tokenId — the metadata of an order NFT and of a trade receipt
  • GET /v1/me/takes, GET /v1/takes/:id/receipt — private activity and receipts
  • GET /v1/explorer/summary, GET /v1/explorer/fills — public redacted statistics

Contracts can also be used directly. The API is a convenience; settlement authority is on-chain.

Contracts

Every order is an NFT of its network's order contract (ERC-721); its token id is the order's id as a number. Whoever holds it owns the order.