Skip to main content

Integrator ID and Fees

The integrator attribute takes your integrator ID. It credits the trades made in your widget to your organisation, and it is what lets you charge your own fee on them. The widget works without one: trades then go through at the standard price, credited to no one.

<treasures-swap integrator="intg_…"></treasures-swap>

Getting an ID​

Integrator IDs are issued by the Treasures team. Write to hello@treasures.io to register, get your ID or set a fee. If your organisation already holds an integrator API key, the ID belongs to the same organisation, and widget trades are reported and paid out alongside your API trades.

The ID is public​

The ID goes in your page's HTML, so treat it as public. It is not an API key and is not the tik_ key you would use for the REST API; never put an API key in a web page.

Naming an ID only ever credits its registered owner, and the fee behind it is set with Treasures, never in the page, so a copied snippet can't raise it. A site that pastes your ID credits its trades to you as well, and they appear in your reporting. If you see an ID misused, contact the Treasures team.

Checking your ID​

  • The treasures:ready event carries integrator_recognized: false when you set no ID or one that isn't an ID's shape, null while a well-formed ID is still unchecked.
  • After the first quote, the treasures:integrator event carries recognized: whether the ID belongs to a registered, active integrator.
  • If it does not, the element also logs a warning to your browser's console: trades from that widget credit no integrator.

An unknown, malformed or suspended ID never blocks a trade. The widget keeps working as an anonymous widget, at the standard price, with no fee and no credit.

Your widget fee​

A registered integrator may add its own fee on widget trades:

  • Up to 1%, and optional. It is none until you and Treasures agree on one.
  • Separate from your API integrator fee. Setting a fee for your API key does not charge widget users, and the reverse.
  • Set with Treasures, never in the page, so no attribute changes it.
  • Shown to the user before they sign, as its own fee line labelled with your organisation's public name. Tell the Treasures team the name to show before you go live.

Without a fee, the widget trades at the same price as swap.treasures.io.

The fee is taken inside the trade, like the integrator fee on API trades, and accrues to the same balance. You claim it in USDC through the payout routes described there.

Reporting​

Trades credited to your ID appear in GET /settlements, read with your integrator API key, with each trade's wallet and transaction, as API trades do. That includes trades from any site that pasted your ID. Reading settlements needs an integrator key; ask for one when you register if you don't have one yet.