Pieniądze i równowaga

Lista wszystkich publicznie dostępnych metod interakcji z API.

GET

Pobierz saldo użytkownika -/user/balance

Metoda zapytania

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

Parametry zapytania

IdentyfikatorRegulaminPrzykład
currencyNie koniecznienullablecurrency_code"USD"

Przykłady kodu

1async function getUserBalance() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/user/balance?' + Object.entries({
4         "currency": "USD"
5      }).map(([key, value]) => key + "=" + value).join('&'), {
6         method: 'GET',
7         headers: {
8            'Authorization': 'API-Token [YOUR TOKEN]',
9            'Content-Type': 'application/json'
10         }
11      }
12   );
13   
14   const res = await req.json();
15}

Przykłady odpowiedzi

GET

Pobierz historię salda użytkownika -/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

1async function getUserBalanceHistory() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/user/balance-history?' + Object.entries({
4         "type": "",
5         "with-hidden": false,
6         "from": null,
7         "to": null,
8         "search": 39,
9         "redirect-url": 738,
10         "per-page": 47,
11         "page": 48,
12         "sort-by": "",
13         "sort-order": "asc"
14      }).map(([key, value]) => key + "=" + value).join('&'), {
15         method: 'GET',
16         headers: {
17            'Authorization': 'API-Token [YOUR TOKEN]',
18            'Content-Type': 'application/json'
19         }
20      }
21   );
22   
23   const res = await req.json();
24}

Przykłady odpowiedzi

GET

Uzyskaj saldo subskrypcji użytkownika -/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

1async function getUserBalanceSubscriptions() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/user/balance-subscriptions?' + Object.entries({
4         "from": null,
5         "to": null,
6         "status": 0,
7         "search": 69,
8         "redirect-url": 360,
9         "per-page": 61,
10         "page": 74,
11         "sort-by": "",
12         "sort-order": "asc"
13      }).map(([key, value]) => key + "=" + value).join('&'), {
14         method: 'GET',
15         headers: {
16            'Authorization': 'API-Token [YOUR TOKEN]',
17            'Content-Type': 'application/json'
18         }
19      }
20   );
21   
22   const res = await req.json();
23}

Przykłady odpowiedzi

GET

Wyświetl wpis historii salda -/user/balance-history/{id}

Metoda zapytania

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

Parametry zapytania

IdentyfikatorRegulaminPrzykład
id1required38

Przykłady kodu

1async function getUserBalanceHistory() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/user/balance-history/{id}'
4      .replace("{id}", 38), {
5         method: 'GET',
6         headers: {
7            'Authorization': 'API-Token [YOUR TOKEN]',
8            'Content-Type': 'application/json'
9         }
10      }
11   );
12   
13   const res = await req.json();
14}

Przykłady odpowiedzi

DELETE

Anuluj subskrypcję -/user/balance-subscriptions/{subscription}

Metoda zapytania

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

Parametry zapytania

IdentyfikatorRegulaminPrzykład
subscription1requirednull

Przykłady kodu

1async function deleteUserBalanceSubscriptions() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/user/balance-subscriptions/{subscription}'
4      .replace("{subscription}", null), {
5         method: 'DELETE',
6         headers: {
7            'Authorization': 'API-Token [YOUR TOKEN]',
8            'Content-Type': 'application/json'
9         }
10      }
11   );
12   
13   const res = await req.json();
14}

Przykłady odpowiedzi

PUT

Automatyczne odnawianie subskrypcji -/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

1async function putUserBalanceSubscriptionsToggle() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/user/balance-subscriptions/{subscription}/toggle'
4      .replace("{subscription}", null), {
5         method: 'PUT',
6         headers: {
7            'Authorization': 'API-Token [YOUR TOKEN]',
8            'Content-Type': 'application/json'
9         }
10      }
11   );
12   
13   const res = await req.json();
14}

Przykłady odpowiedzi

GET

Sprawdź kursy walut -/money/rates

Metoda zapytania

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

Przykłady kodu

1async function getMoneyRates() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/money/rates', {
4         method: 'GET',
5         headers: {
6            'Content-Type': 'application/json'
7         }
8      }
9   );
10   
11   const res = await req.json();
12}

Przykłady odpowiedzi

POSTPUT

Doładowanie użytkownika -/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

1async function postUserTopup() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/user/topup', {
4         method: 'POST',
5         headers: {
6            'Authorization': 'API-Token [YOUR TOKEN]',
7            'Content-Type': 'application/json'
8         },
9         body: JSON.stringify({
10            "method-id": 57,
11            "amount": 30894,
12            "currency": "USD",
13            "is-buying": false,
14            "subscription": null,
15            "redirect-url": 961
16         }),
17      }
18   );
19   
20   const res = await req.json();
21}

Przykłady odpowiedzi

GET

Pobierz metody doładowania użytkownika -/user/topup-methods

Metoda zapytania

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

Przykłady kodu

1async function getUserTopupMethods() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/user/topup-methods', {
4         method: 'GET',
5         headers: {
6            'Authorization': 'API-Token [YOUR TOKEN]',
7            'Content-Type': 'application/json'
8         }
9      }
10   );
11   
12   const res = await req.json();
13}

Przykłady odpowiedzi

GET

Zakończ kwotę -/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

1async function getUserTopupFinalizeAmount() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/user/topup/finalize-amount?' + Object.entries({
4         "amount": 36199,
5         "currency": "USD"
6      }).map(([key, value]) => key + "=" + value).join('&'), {
7         method: 'GET',
8         headers: {
9            'Content-Type': 'application/json'
10         }
11      }
12   );
13   
14   const res = await req.json();
15}

Przykłady odpowiedzi