cURL
curl --request PATCH \
--url 'https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419"
headers = {"X-API-KEY": "<api-key>"}
response = requests.request("PATCH", url, headers=headers)
print(response.json())const options = {method: 'PATCH', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419"
req, _ := http.NewRequest("PATCH", url, nil)
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.patch("https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinstats.app/v1/exchange/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true
}{
"statusCode": 400,
"message": "Bad Request",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 401,
"message": "Unauthorized",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 403,
"message": "Forbidden",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 404,
"message": "Not Found",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 409,
"message": "Transactions not synced",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 503,
"message": "Service Unavailable. Please Contact Support"
}Exchange Connection
Exchange Sync Status
Initiate syncing process for the given exchange portfolio by portfolioId.
PATCH
/
v1
/
exchange
/
sync
cURL
curl --request PATCH \
--url 'https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419"
headers = {"X-API-KEY": "<api-key>"}
response = requests.request("PATCH", url, headers=headers)
print(response.json())const options = {method: 'PATCH', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419"
req, _ := http.NewRequest("PATCH", url, nil)
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.patch("https://api.coinstats.app/v1/exchange/sync?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinstats.app/v1/exchange/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true
}{
"statusCode": 400,
"message": "Bad Request",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 401,
"message": "Unauthorized",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 403,
"message": "Forbidden",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 404,
"message": "Not Found",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 409,
"message": "Transactions not synced",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 503,
"message": "Service Unavailable. Please Contact Support"
}20 credits per request
Required
Required
- portfolioId: Identifier of an exchange portfolio you have connected.
Authorizations
API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the X-API-KEY request header. Never expose your key in client-side code.
Query Parameters
The identifier of portfolio, which you received from Exchange Balance call response.
Example:
"618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419"
Response
Sync exchange
Success status of the sync process
Example:
true
Was this page helpful?
⌘I