Get user stats for contest
curl --request GET \
--url https://backend.swap.coffee/v1/contests/{id}/user/{address} \
--header 'X-Api-Key: <api-key>' \
--header 'x-verify: <x-verify>'import requests
url = "https://backend.swap.coffee/v1/contests/{id}/user/{address}"
headers = {
"x-verify": "<x-verify>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-verify': '<x-verify>', 'X-Api-Key': '<api-key>'}};
fetch('https://backend.swap.coffee/v1/contests/{id}/user/{address}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://backend.swap.coffee/v1/contests/{id}/user/{address}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>",
"x-verify: <x-verify>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://backend.swap.coffee/v1/contests/{id}/user/{address}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-verify", "<x-verify>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://backend.swap.coffee/v1/contests/{id}/user/{address}")
.header("x-verify", "<x-verify>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.swap.coffee/v1/contests/{id}/user/{address}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-verify"] = '<x-verify>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"address": "UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV",
"position": 123,
"volume_usd": 123
}{
"error": "<string>"
}Contests
Get user stats for contest
GET
/
v1
/
contests
/
{id}
/
user
/
{address}
Get user stats for contest
curl --request GET \
--url https://backend.swap.coffee/v1/contests/{id}/user/{address} \
--header 'X-Api-Key: <api-key>' \
--header 'x-verify: <x-verify>'import requests
url = "https://backend.swap.coffee/v1/contests/{id}/user/{address}"
headers = {
"x-verify": "<x-verify>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-verify': '<x-verify>', 'X-Api-Key': '<api-key>'}};
fetch('https://backend.swap.coffee/v1/contests/{id}/user/{address}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://backend.swap.coffee/v1/contests/{id}/user/{address}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>",
"x-verify: <x-verify>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://backend.swap.coffee/v1/contests/{id}/user/{address}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-verify", "<x-verify>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://backend.swap.coffee/v1/contests/{id}/user/{address}")
.header("x-verify", "<x-verify>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.swap.coffee/v1/contests/{id}/user/{address}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-verify"] = '<x-verify>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"address": "UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV",
"position": 123,
"volume_usd": 123
}{
"error": "<string>"
}Authorizations
Headers
TON proof for the given address
Path Parameters
Example:
"UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV"
⌘I