API
The public API behind this website. The full machine-readable description is available as OpenAPI 3.1 at https://api.noveraswap.com/v1/openapi.json.
Integration guide
Three ways to bring private swaps to your users, from a link to a full server integration.
Referral link
Get a code on the affiliates page. With it comes a dashboard key that starts with aff_; it is shown only once, so keep it safe.
Share https://noveraswap.com/?ref=YOURCODE with your code in place of YOURCODE, or add ?ref=YOURCODE to the home page or to any swap page (/swap/…); the code works where the swap form is.
Every order made through your link earns you a share of what the service actually receives for that order. You see totals only, never anything about the people you refer.
Earnings are paid in USDC after you request a payout in the dashboard. Most payouts are sent automatically within minutes; sometimes one waits for our team, which can take a few days.
Widget
Embed the swap form in your page with an iframe. Your visitors swap on our page inside the frame, so your site never handles their coins or addresses.
<iframe
src="https://noveraswap.com/widget?from=usdt-eth&to=usdc-base&ref=YOURCODE&theme=auto"
title="NoveraSwap"
width="420"
height="680"
allow="clipboard-write"
style="border:0"
loading="lazy"
></iframe>Query parameters, all optional:
from— the asset to send, by its ID on this site (for example usdt-eth)to— the asset to receive, by its IDamount— the amount to send, with a dot as the decimal separatormode— private or standardref— your affiliate code, so orders made in the widget count for youtheme— dark, light or auto (follows the visitor's system setting)lockTo— 1 keeps the receive asset fixed; needs to
The widget tells your page about progress with postMessage: novera:order_created carries the order ID, novera:phase_changed the order ID and its public phase. Check that a message comes from this site (event.origin) before you use it.
window.addEventListener('message', (event) => {
if (event.origin !== 'https://noveraswap.com') return;
if (event.data?.type === 'novera:order_created') {
// event.data.orderId
}
if (event.data?.type === 'novera:phase_changed') {
// event.data.orderId, event.data.phase
}
});Server-to-server API
Create your key in the affiliate dashboard (get a code on the affiliates page first). Every order created with it earns your affiliate share, exactly like an order from your referral link. Creating a key again replaces the earlier one at once.
Call the API from your own server with an integrator key that starts with nsk_, sent in the X-Api-Key header. Never use the key in a browser: requests that carry an Origin header are refused.
Rate limits apply per key. Keep the key on your server like a password: whoever has it creates orders in your name.
A new key starts with the limits of a visitor without a key, including the occasional proof of work, and can hold only a few orders waiting for a deposit; once some of its orders have been paid it gets the full limits. A key whose orders are almost never paid is blocked; support can reactivate it.
The full reference is the OpenAPI document at https://api.noveraswap.com/v1/openapi.json.
Integrators use the same API server to server with their own key. A browser can never use an integrator key.
Affiliates
| Endpoint | What it does |
|---|---|
| POST/v1/affiliates | Sign up as an affiliate and reserve a referral code. |
| GET/v1/affiliates/me | The affiliate account and its totals (aggregates only). |
| PATCH/v1/affiliates/me | Change the payout address or contact. |
| DELETE/v1/affiliates/me/api-key | Revoke the affiliate's own server-to-server API key. |
| POST/v1/affiliates/me/api-key | Create (or replace) the affiliate's own server-to-server API key. |
| POST/v1/affiliates/me/key | Replace the affiliate key. |
| POST/v1/affiliates/me/payout-request | Request a payout of the whole withdrawable balance. |
| POST/v1/affiliates/me/recovery-code | Make a new recovery code. |
| DELETE/v1/affiliates/me/recovery-email | Remove the recovery email. |
| POST/v1/affiliates/me/recovery-email | Add or replace the optional recovery email. |
| POST/v1/affiliates/me/recovery-email/verify | Confirm the recovery email with the code mailed to it. |
| GET/v1/affiliates/me/statements | Statements and payout requests with their status, newest first. |
| GET/v1/affiliates/me/stats | Referred orders and earnings per day, week or month (aggregates only). |
| GET/v1/affiliates/me/tickets | The affiliate's support requests, newest first. |
| POST/v1/affiliates/me/tickets | Open a support request about the affiliate account. |
| GET/v1/affiliates/me/tickets/{ticketId} | One support request and its thread. |
| POST/v1/affiliates/me/tickets/{ticketId}/close | Close a support request. |
| POST/v1/affiliates/me/tickets/{ticketId}/messages | Write to a support request. |
| POST/v1/affiliates/recover | Ask for a key recovery code (no key). |
| POST/v1/affiliates/recover/confirm | Exchange a recovery code for a new key (no key). |
Catalogue
| Endpoint | What it does |
|---|---|
| GET/v1/assets | Enabled assets with their networks and the pricing notice copy. |
| GET/v1/pairs/limits | Minimum and maximum input amount for a pair. |
Utilities
| Endpoint | What it does |
|---|---|
| GET/v1/go/{id} | Redirect to the sponsor, counting the click. |
| GET/v1/openapi.json | This OpenAPI 3.1 document. |
| GET/v1/pow | Proof-of-work challenge parameters for `X-Novera-PoW`. |
| GET/v1/sponsors | The sponsored card for a slot, if any. |
| POST/v1/sponsors/{id}/impression | Count one impression of a placement. |
| GET/v1/status | Service status, completion statistics, incidents and the signing-key manifest. |
| POST/v1/telemetry/client-errors | Opt-in client error reports. |
| POST/v1/validate-address | Check an address for an asset, locally. |
Health
| Endpoint | What it does |
|---|---|
| GET/v1/health | Liveness; no dependencies. |
| GET/v1/health/ready | Readiness: `200` when ready (possibly degraded), `503` otherwise. |
Orders
| Endpoint | What it does |
|---|---|
| POST/v1/orders | Create an order from a quote. |
| GET/v1/orders/{publicId} | Order status: minimal without the secret, full with it. |
| POST/v1/orders/{publicId}/action | Answer the form in `actionRequired`. |
| POST/v1/orders/{publicId}/cancel | Cancel an order that is still waiting for its deposit. |
| DELETE/v1/orders/{publicId}/details | Delete the order details now instead of at the automatic deletion. |
| GET/v1/orders/{publicId}/events | The full public timeline, with transaction hashes where present. |
| POST/v1/orders/{publicId}/notifications | Opt into status notifications by email or Telegram. |
| DELETE/v1/orders/{publicId}/notifications/{channel} | Remove a notification channel. |
| POST/v1/orders/{publicId}/refund-address | Register or replace the refund address. |
Support
| Endpoint | What it does |
|---|---|
| GET/v1/orders/{publicId}/tickets | Every ticket on the order with its thread. |
| POST/v1/orders/{publicId}/tickets | Open a support ticket on an order. |
| GET/v1/orders/{publicId}/tickets/{ticketId} | One ticket and its thread. |
| POST/v1/orders/{publicId}/tickets/{ticketId}/close | Close a ticket and release its hold on the order details. |
| POST/v1/orders/{publicId}/tickets/{ticketId}/messages | Add a message to a ticket. |
| POST/v1/support/requests | Open a support request without an order. |
| GET/v1/support/requests/{ticketId} | A request without an order and its thread. |
| POST/v1/support/requests/{ticketId}/close | Close a request without an order. |
| POST/v1/support/requests/{ticketId}/messages | Add a message to a request without an order. |
Quotes
| Endpoint | What it does |
|---|---|
| POST/v1/quotes | Quote a swap. |