API
このウェブサイトを支える公開 API です。機械可読な完全な仕様は、OpenAPI 3.1 形式で https://api.noveraswap.com/v1/openapi.json から入手できます。
連携ガイド
リンクから完全なサーバー連携まで、ユーザーにプライベートスワップを提供する3つの方法です。
紹介リンク
アフィリエイトページでコードを取得してください。あわせて aff_ で始まるダッシュボードキーが発行されます。一度しか表示されないので、大切に保管してください。
YOURCODE を自分のコードに置き換えて https://noveraswap.com/?ref=YOURCODE を共有するか、トップページまたはスワップページ(/swap/…)のアドレスに ?ref=YOURCODE を付けてください。コードはスワップフォームのあるページで有効です。
リンク経由で作成された注文ごとに、その注文でサービスが実際に受け取った収益の一部を受け取れます。表示されるのは合計のみで、紹介した人に関する情報は一切表示されません。
収益は、ダッシュボードで支払いをリクエストした後、USDC で支払われます。ほとんどの支払いは数分以内に自動で送金されます。当社チームの対応を待つ場合は、数日かかることがあります。
ウィジェット
iframe を使ってスワップフォームをページに埋め込めます。訪問者はフレーム内の当社のページでスワップするため、お客様のサイトが訪問者のコインやアドレスを扱うことはありません。
<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>クエリパラメーター(すべて任意):
from— 送る資産。このサイトでの ID で指定(例:usdt-eth)to— 受け取る資産。ID で指定amount— 送る金額。小数点にはドットを使用mode— private または standardref— ウィジェットでの注文をお客様の実績として数えるためのアフィリエイトコードtheme— dark、light または auto(訪問者のシステム設定に従う)lockTo— 1 で受け取る資産を固定(to が必要)
ウィジェットは postMessage で進行状況をページに通知します。novera:order_created は注文IDを、novera:phase_changed は注文IDと公開フェーズを伝えます。メッセージを使う前に、このサイトから送られたものか(event.origin)を確認してください。
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
}
});サーバー間 API
アフィリエイトダッシュボードでキーを作成してください(先にアフィリエイトページでコードを取得します)。このキーで作成した注文はすべて、紹介リンク経由の注文とまったく同じようにアフィリエイト報酬の対象になります。キーを再度作成すると、以前のキーは直ちに置き換えられます。
nsk_ で始まるインテグレーターキーを X-Api-Key ヘッダーで送り、ご自身のサーバーから API を呼び出してください。キーは決してブラウザで使わないでください。Origin ヘッダー付きのリクエストは拒否されます。
レート制限はキーごとに適用されます。キーはパスワードと同じようにサーバー上で保管してください。キーを持つ人は誰でもお客様の名義で注文を作成できます。
新しいキーは、キーを持たない訪問者と同じ制限(ときどき必要なプルーフ・オブ・ワークを含む)で始まり、入金待ちの注文は少数しか保持できません。注文の一部が支払われると、完全な制限が適用されます。注文がほとんど支払われないキーはブロックされます。再有効化はサポートが行えます。
完全なリファレンスは https://api.noveraswap.com/v1/openapi.json にある OpenAPI ドキュメントです。
インテグレーターは、同じ API を独自のキーを使ってサーバー間で利用します。ブラウザからインテグレーターのキーを使用することは決してできません。
Affiliates
| エンドポイント | 内容 |
|---|---|
| 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
| エンドポイント | 内容 |
|---|---|
| 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
| エンドポイント | 内容 |
|---|---|
| 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
| エンドポイント | 内容 |
|---|---|
| GET/v1/health | Liveness; no dependencies. |
| GET/v1/health/ready | Readiness: `200` when ready (possibly degraded), `503` otherwise. |
Orders
| エンドポイント | 内容 |
|---|---|
| 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
| エンドポイント | 内容 |
|---|---|
| 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
| エンドポイント | 内容 |
|---|---|
| POST/v1/quotes | Quote a swap. |