Skip to content
NoveraSwap
en

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 ID
  • amount — the amount to send, with a dot as the decimal separator
  • mode — private or standard
  • ref — your affiliate code, so orders made in the widget count for you
  • theme — 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
  }
});
A host page can never pre-fill the destination or refund address, neither in the URL nor through postMessage: only the visitor types where the coins go. If you need to set the destination yourself, use the server-to-server API.

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

EndpointWhat it does
POST/v1/affiliatesSign up as an affiliate and reserve a referral code.
GET/v1/affiliates/meThe affiliate account and its totals (aggregates only).
PATCH/v1/affiliates/meChange the payout address or contact.
DELETE/v1/affiliates/me/api-keyRevoke the affiliate's own server-to-server API key.
POST/v1/affiliates/me/api-keyCreate (or replace) the affiliate's own server-to-server API key.
POST/v1/affiliates/me/keyReplace the affiliate key.
POST/v1/affiliates/me/payout-requestRequest a payout of the whole withdrawable balance.
POST/v1/affiliates/me/recovery-codeMake a new recovery code.
DELETE/v1/affiliates/me/recovery-emailRemove the recovery email.
POST/v1/affiliates/me/recovery-emailAdd or replace the optional recovery email.
POST/v1/affiliates/me/recovery-email/verifyConfirm the recovery email with the code mailed to it.
GET/v1/affiliates/me/statementsStatements and payout requests with their status, newest first.
GET/v1/affiliates/me/statsReferred orders and earnings per day, week or month (aggregates only).
GET/v1/affiliates/me/ticketsThe affiliate's support requests, newest first.
POST/v1/affiliates/me/ticketsOpen 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}/closeClose a support request.
POST/v1/affiliates/me/tickets/{ticketId}/messagesWrite to a support request.
POST/v1/affiliates/recoverAsk for a key recovery code (no key).
POST/v1/affiliates/recover/confirmExchange a recovery code for a new key (no key).

Catalogue

EndpointWhat it does
GET/v1/assetsEnabled assets with their networks and the pricing notice copy.
GET/v1/pairs/limitsMinimum and maximum input amount for a pair.

Utilities

EndpointWhat it does
GET/v1/go/{id}Redirect to the sponsor, counting the click.
GET/v1/openapi.jsonThis OpenAPI 3.1 document.
GET/v1/powProof-of-work challenge parameters for `X-Novera-PoW`.
GET/v1/sponsorsThe sponsored card for a slot, if any.
POST/v1/sponsors/{id}/impressionCount one impression of a placement.
GET/v1/statusService status, completion statistics, incidents and the signing-key manifest.
POST/v1/telemetry/client-errorsOpt-in client error reports.
POST/v1/validate-addressCheck an address for an asset, locally.

Health

EndpointWhat it does
GET/v1/healthLiveness; no dependencies.
GET/v1/health/readyReadiness: `200` when ready (possibly degraded), `503` otherwise.

Orders

EndpointWhat it does
POST/v1/ordersCreate an order from a quote.
GET/v1/orders/{publicId}Order status: minimal without the secret, full with it.
POST/v1/orders/{publicId}/actionAnswer the form in `actionRequired`.
POST/v1/orders/{publicId}/cancelCancel an order that is still waiting for its deposit.
DELETE/v1/orders/{publicId}/detailsDelete the order details now instead of at the automatic deletion.
GET/v1/orders/{publicId}/eventsThe full public timeline, with transaction hashes where present.
POST/v1/orders/{publicId}/notificationsOpt into status notifications by email or Telegram.
DELETE/v1/orders/{publicId}/notifications/{channel}Remove a notification channel.
POST/v1/orders/{publicId}/refund-addressRegister or replace the refund address.

Support

EndpointWhat it does
GET/v1/orders/{publicId}/ticketsEvery ticket on the order with its thread.
POST/v1/orders/{publicId}/ticketsOpen a support ticket on an order.
GET/v1/orders/{publicId}/tickets/{ticketId}One ticket and its thread.
POST/v1/orders/{publicId}/tickets/{ticketId}/closeClose a ticket and release its hold on the order details.
POST/v1/orders/{publicId}/tickets/{ticketId}/messagesAdd a message to a ticket.
POST/v1/support/requestsOpen a support request without an order.
GET/v1/support/requests/{ticketId}A request without an order and its thread.
POST/v1/support/requests/{ticketId}/closeClose a request without an order.
POST/v1/support/requests/{ticketId}/messagesAdd a message to a request without an order.

Quotes

EndpointWhat it does
POST/v1/quotesQuote a swap.