Użytkownik

Lista wszystkich publicznie dostępnych metod interakcji z API.

GET

Pieniądze i saldo -/user/balance

Metoda zapytania

GEThttp://apilocal.stableproxy.com/v2/user/balance

Parametry zapytania

IdentyfikatorRegulaminPrzykład
currencyNie koniecznienullablecurrency_code"USD"

Przykłady kodu

async function getUserBalance() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/balance?' + Object.entries({
         "currency": "USD"
      }).map(([key, value]) => key + "=" + value).join('&'), {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

GET

Pieniądze i saldo -/user/balance-history

Metoda zapytania

GEThttp://apilocal.stableproxy.com/v2/user/balance-history

Parametry zapytania

IdentyfikatorRegulaminPrzykład
typeNie koniecznienullableapp\_validators\_ex_in_rule""
with-hiddenNie koniecznienullableex-booleanfalse
fromNie koniecznienullabledatenull
toNie koniecznienullabledatenull
searchNie koniecznienullablestring39
redirect-urlNie koniecznienullableurl738
per-pageNie koniecznienullableinteger47
pageNie koniecznienullableinteger48
sort-byNie koniecznienullablestringapp\_validators\_ex_in_rule""
sort-orderNie koniecznienullablestringin:asc, desc"asc"

Przykłady kodu

async function getUserBalanceHistory() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/balance-history?' + Object.entries({
         "type": "",
         "with-hidden": false,
         "from": null,
         "to": null,
         "search": 39,
         "redirect-url": 738,
         "per-page": 47,
         "page": 48,
         "sort-by": "",
         "sort-order": "asc"
      }).map(([key, value]) => key + "=" + value).join('&'), {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

GET

Pieniądze i saldo -/user/balance-subscriptions

Metoda zapytania

GEThttp://apilocal.stableproxy.com/v2/user/balance-subscriptions

Parametry zapytania

IdentyfikatorRegulaminPrzykład
fromNie koniecznienullabledatenull
toNie koniecznienullabledatenull
statusNie koniecznienullablenumeric0
searchNie koniecznienullablestring69
redirect-urlNie koniecznienullableurl360
per-pageNie koniecznienullableinteger61
pageNie koniecznienullableinteger74
sort-byNie koniecznienullablestringapp\_validators\_ex_in_rule""
sort-orderNie koniecznienullablestringin:asc, desc"asc"

Przykłady kodu

async function getUserBalanceSubscriptions() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/balance-subscriptions?' + Object.entries({
         "from": null,
         "to": null,
         "status": 0,
         "search": 69,
         "redirect-url": 360,
         "per-page": 61,
         "page": 74,
         "sort-by": "",
         "sort-order": "asc"
      }).map(([key, value]) => key + "=" + value).join('&'), {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

GET

Pieniądze i saldo -/user/balance-history/{id}

Metoda zapytania

GEThttp://apilocal.stableproxy.com/v2/user/balance-history/{id}

Parametry zapytania

IdentyfikatorRegulaminPrzykład
id1required38

Przykłady kodu

async function getUserBalanceHistory() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/balance-history/{id}'
      .replace("{id}", 38), {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

DELETE

Pieniądze i saldo -/user/balance-subscriptions/{subscription}

Metoda zapytania

DELETEhttp://apilocal.stableproxy.com/v2/user/balance-subscriptions/{subscription}

Parametry zapytania

IdentyfikatorRegulaminPrzykład
subscription1requirednull

Przykłady kodu

async function deleteUserBalanceSubscriptions() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/balance-subscriptions/{subscription}'
      .replace("{subscription}", null), {
         method: 'DELETE',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

PUT

Przełącz automatyczne odnawianie subskrypcji Pieniądze i saldo Użytkownik -/user/balance-subscriptions/{subscription}/toggle

Metoda zapytania

PUThttp://apilocal.stableproxy.com/v2/user/balance-subscriptions/{subscription}/toggle

Parametry zapytania

IdentyfikatorRegulaminPrzykład
subscription1requirednull

Przykłady kodu

async function putUserBalanceSubscriptionsToggle() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/balance-subscriptions/{subscription}/toggle'
      .replace("{subscription}", null), {
         method: 'PUT',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

GET

Pieniądze i saldo -/money/rates

Metoda zapytania

GEThttp://apilocal.stableproxy.com/v2/money/rates

Przykłady kodu

async function getMoneyRates() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/money/rates', {
         method: 'GET',
         headers: {
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

POSTPUT

Pieniądze i saldo -/user/topup

Metoda zapytania

POSThttp://apilocal.stableproxy.com/v2/user/topup

Parametry zapytania

IdentyfikatorRegulaminPrzykład
method-idrequiredapp\_validators\_ex_in_rule57
amountrequirednumeric30894
currencyrequiredcurrency_code"USD"
is-buyingNie koniecznienullableex_booleanfalse
subscriptionNie koniecznienullablenull
redirect-urlNie koniecznienullableurl961

Przykłady kodu

async function postUserTopup() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/topup', {
         method: 'POST',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         },
         body: JSON.stringify({
            "method-id": 57,
            "amount": 30894,
            "currency": "USD",
            "is-buying": false,
            "subscription": null,
            "redirect-url": 961
         }),
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

GET

Uzyskaj metody doładowania użytkownika Pieniądze i saldo użytkownika -/user/topup-methods

Metoda zapytania

GEThttp://apilocal.stableproxy.com/v2/user/topup-methods

Przykłady kodu

async function getUserTopupMethods() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/topup-methods', {
         method: 'GET',
         headers: {
            'Authorization': 'API-Token [YOUR TOKEN]',
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi

GET

Pieniądze i saldo -/user/topup/finalize-amount

Metoda zapytania

GEThttp://apilocal.stableproxy.com/v2/user/topup/finalize-amount

Parametry zapytania

IdentyfikatorRegulaminPrzykład
amountrequirednumeric36199
currencyNie koniecznienullablecurrency_code"USD"

Przykłady kodu

async function getUserTopupFinalizeAmount() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/user/topup/finalize-amount?' + Object.entries({
         "amount": 36199,
         "currency": "USD"
      }).map(([key, value]) => key + "=" + value).join('&'), {
         method: 'GET',
         headers: {
            'Content-Type': 'application/json'
         }
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi