İçeriğe geç
NoveraSwap
tr

API

Bu web sitesinin arkasındaki herkese açık API. Makine tarafından okunabilir tam açıklama, OpenAPI 3.1 olarak şu adreste bulunur: https://api.noveraswap.com/v1/openapi.json.

Entegrasyon kılavuzu

Bir bağlantıdan tam sunucu entegrasyonuna kadar, kullanıcılarınıza gizli takas sunmanın üç yolu.

Referans bağlantısı

Ortaklık sayfasından bir kod alın. Kodla birlikte aff_ ile başlayan bir panel anahtarı da alırsınız; yalnızca bir kez gösterilir, bu yüzden güvenle saklayın.

YOURCODE yerine kendi kodunuzu yazarak https://noveraswap.com/?ref=YOURCODE bağlantısını paylaşın veya ana sayfanın veya herhangi bir takas sayfasının (/swap/…) adresine ?ref=YOURCODE ekleyin; kod, takas formunun bulunduğu sayfalarda çalışır.

Bağlantınız üzerinden yapılan her sipariş, hizmetin o sipariş için fiilen elde ettiği gelirden size pay kazandırır. Yalnızca toplamları görürsünüz, yönlendirdiğiniz kişiler hakkında asla hiçbir şey görmezsiniz.

Kazançlar, panelden ödeme talep ettikten sonra USDC olarak ödenir. Çoğu ödeme birkaç dakika içinde otomatik olarak gönderilir; bazen bir ödeme ekibimizi bekler ve bu birkaç gün sürebilir.

Widget

Takas formunu bir iframe ile sayfanıza yerleştirin. Ziyaretçileriniz çerçevenin içinde bizim sayfamızda takas yapar; siteniz onların coinleriyle veya adresleriyle hiç uğraşmaz.

<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>

Sorgu parametreleri, hepsi isteğe bağlı:

  • from — gönderilecek varlık, bu sitedeki kimliğiyle (örneğin usdt-eth)
  • to — alınacak varlık, kimliğiyle
  • amount — gönderilecek tutar, ondalık ayırıcı olarak nokta ile
  • mode — private veya standard
  • ref — widget üzerinden verilen siparişlerin size sayılması için ortaklık kodunuz
  • theme — dark, light veya auto (ziyaretçinin sistem ayarını izler)
  • lockTo — 1, alınacak varlığı sabitler; to parametresini gerektirir

Widget, ilerlemeyi sayfanıza postMessage ile bildirir: novera:order_created sipariş kimliğini, novera:phase_changed sipariş kimliğini ve herkese açık aşamayı taşır. Bir mesajı kullanmadan önce bu siteden geldiğini (event.origin) kontrol edin.

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
  }
});
Barındıran bir sayfa hedef adresi veya iade adresini asla önceden dolduramaz; ne URL ile ne de postMessage ile: coinlerin nereye gideceğini yalnızca ziyaretçi yazar. Hedefi kendiniz belirlemeniz gerekiyorsa sunucudan sunucuya API'yi kullanın.

Sunucudan sunucuya API

Anahtarınızı ortaklık panelinde oluşturun (önce ortaklık sayfasından bir kod alın). Bu anahtarla oluşturulan her sipariş, tıpkı referans bağlantınızla gelen bir sipariş gibi size ortaklık payınızı kazandırır. Yeni bir anahtar oluşturursanız bu anahtar öncekinin yerini hemen alır.

API'yi kendi sunucunuzdan, nsk_ ile başlayan ve X-Api-Key başlığında gönderilen bir entegratör anahtarıyla çağırın. Anahtarı asla bir tarayıcıda kullanmayın: Origin başlığı taşıyan istekler reddedilir.

İstek sınırları anahtar başına uygulanır. Anahtarı sunucunuzda bir parola gibi saklayın: elinde olan herkes sizin adınıza sipariş oluşturur.

Yeni bir anahtar, ara sıra gereken iş kanıtı dahil, anahtarı olmayan bir ziyaretçinin limitleriyle başlar ve depozito bekleyen yalnızca birkaç sipariş tutabilir; siparişlerinin bir kısmı ödendiğinde tam limitleri alır. Siparişleri neredeyse hiç ödenmeyen bir anahtar engellenir; destek onu yeniden etkinleştirebilir.

Tam başvuru kaynağı https://api.noveraswap.com/v1/openapi.json adresindeki OpenAPI belgesidir.

Entegratörler aynı API'yi kendi anahtarlarıyla sunucudan sunucuya kullanır. Bir tarayıcı asla entegratör anahtarı kullanamaz.

Affiliates

Uç noktaNe yapar
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

Uç noktaNe yapar
GET/v1/assetsEnabled assets with their networks and the pricing notice copy.
GET/v1/pairs/limitsMinimum and maximum input amount for a pair.

Utilities

Uç noktaNe yapar
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

Uç noktaNe yapar
GET/v1/healthLiveness; no dependencies.
GET/v1/health/readyReadiness: `200` when ready (possibly degraded), `503` otherwise.

Orders

Uç noktaNe yapar
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

Uç noktaNe yapar
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

Uç noktaNe yapar
POST/v1/quotesQuote a swap.