Skip to main content
GET
/
v1
/
strategies
/
{address}
/
order
Get strategy order
curl --request GET \
  --url https://backend.swap.coffee/v1/strategies/{address}/order \
  --header 'X-Api-Key: <api-key>' \
  --header 'x-verify: <x-verify>'
import requests

url = "https://backend.swap.coffee/v1/strategies/{address}/order"

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/strategies/{address}/order', 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/strategies/{address}/order",
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/strategies/{address}/order"

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/strategies/{address}/order")
.header("x-verify", "<x-verify>")
.header("X-Api-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://backend.swap.coffee/v1/strategies/{address}/order")

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
{
  "id": 123,
  "wallet": "UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV",
  "creation_timestamp": 123,
  "token_from": {
    "address": {
      "blockchain": "ton",
      "address": "native"
    },
    "metadata": {
      "name": "ARBUZ",
      "symbol": "ARBUZ",
      "decimals": 123,
      "listed": true,
      "image_url": "<string>"
    }
  },
  "token_to": {
    "address": {
      "blockchain": "ton",
      "address": "native"
    },
    "metadata": {
      "name": "ARBUZ",
      "symbol": "ARBUZ",
      "decimals": 123,
      "listed": true,
      "image_url": "<string>"
    }
  },
  "initial_input_amount": "<string>",
  "current_input_amount": "<string>",
  "settings": {},
  "current_output_amount": "<string>",
  "max_suborders": 123,
  "suborders_executed": 123,
  "max_invocations": 123,
  "invocations_executed": 123,
  "slippage": 0.5005,
  "max_path_length": 123,
  "active_transactions": 123,
  "close_timestamp": 123
}
{
"error": "<string>"
}

Authorizations

X-Api-Key
string
header
required

Headers

x-verify
string
required

TON proof for the given address

Path Parameters

address
string
required
Example:

"UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV"

Query Parameters

id
integer<int32>
required

Response

Account's strategy order

id
integer<int32>
required
type
enum<string>
required
Available options:
limit,
dca,
vca
wallet
string
required
Example:

"UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV"

status
enum<string>
required
Available options:
active,
requested_cancellation,
cancelled_by_user,
cancelled_by_system,
executed,
max_retries_exceeded
creation_timestamp
integer<int64>
required

Unix time in seconds

token_from
object
required
token_to
object
required
initial_input_amount
string
required
current_input_amount
string
required
settings
object
required
current_output_amount
string
required
max_suborders
integer<int32>
required
suborders_executed
integer<int32>
required
max_invocations
integer<int32>
required

Max amount of swaps to be potentially executed (including those that fail to reasons like slippage tolerance abortion)

invocations_executed
integer<int32>
required

Amount of swaps that had already been tried to be executed (including those that failed to reasons like slippage tolerance abortion)

slippage
number<double>
required
Required range: 0.001 <= x <= 1
max_path_length
integer<int32>
required

Max path length in tokens for every route that could potentially be executed within this order

active_transactions
integer<int32>
required

Amount of this order transactions that were sent, but their result is still unknown

close_timestamp
integer<int64>

Unix time in seconds