treasures-b2b-api

Installation
SKILL.md

Treasures B2B API — Agent Skill

Guide for AI agents (and any non-human caller) using the Treasures public B2B API to discover tokenized stocks, quote + execute trades, bridge USDC across chains, and read portfolio + trade history on behalf of a single end-user wallet pair.

  • Base URL: https://api.treasures.io/public/v1
  • Network: trades execute against Ethereum mainnet + Solana mainnet-beta — real funds, not a testnet, plus two more venues: Robinhood Chain (4663) — now co-ranked in unpinned quotes, not just pinned — and Base (8453). Point your own RPCs at mainnet; the token/contract addresses in this skill are mainnet.
  • Required headers: set Content-Type: application/json on every request carrying a body — a body sent with a non-JSON content-type (e.g. text/plain, which some HTTP clients default to when you don't set headers) fails 415 before any schema check. Also send X-Treasures-Skill: treasures-b2b-api and X-Treasures-Skill-Version: 1.6.0 (this skill's metadata.version): today they're informational (the fund-moving endpoints echo X-Treasures-Api-Revision + X-Min-Skill-Version back), but once the API floor rises, an enrolled caller below it gets a clean 426 skill_version_unsupported with upgrade instructions — plus Deprecation/Sunset warning headers during the grace window — instead of a silent break. Omitting the version header opts out of that early warning.
  • Wire format: all token amounts, USDC, shares, prices, and bps-derived decimals are strings (avoid JS float drift). Integer fields (expires_at, *_bps, quote_index) are JSON numbers. Never round-trip a money value through JS number.

This entry doc is the map + the footguns. It is not enough on its own to execute a trade — full schemas, signing code, and error tables live in the references below. Load the reference for the task before you act; you don't need to read them all.

Schema-of-record: an OpenAPI spec (openapi.yaml) is published alongside this skill in the same repository. This skill is self-sufficient for normal use — consult the spec only for exhaustive field-level validation or client codegen; you don't need to read it to operate.

Reference index

Installs
31
First Seen
Jun 9, 2026
treasures-b2b-api — treasures-io/treasures-finance-agent-skills