Create address settlement rule
curl --request POST \
--url https://api.xentfi.com/v1/addresses/{addressId}/settlement-rules \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'orgId: <api-key>' \
--data '
{
"addressId": "<string>",
"name": "<string>",
"slippageTolerance": "<string>",
"source": [
{
"assetId": "<string>",
"minAmount": "<string>",
"maxAmount": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
addressId: '<string>',
name: '<string>',
slippageTolerance: '<string>',
source: [{assetId: '<string>', minAmount: '<string>', maxAmount: '<string>'}]
})
};
fetch('https://api.xentfi.com/v1/addresses/{addressId}/settlement-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.xentfi.com/v1/addresses/{addressId}/settlement-rules"
payload = {
"addressId": "<string>",
"name": "<string>",
"slippageTolerance": "<string>",
"source": [
{
"assetId": "<string>",
"minAmount": "<string>",
"maxAmount": "<string>"
}
]
}
headers = {
"apiKey": "<api-key>",
"orgId": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.xentfi.com/v1/addresses/{addressId}/settlement-rules"
payload := strings.NewReader("{\n \"addressId\": \"<string>\",\n \"name\": \"<string>\",\n \"slippageTolerance\": \"<string>\",\n \"source\": [\n {\n \"assetId\": \"<string>\",\n \"minAmount\": \"<string>\",\n \"maxAmount\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("orgId", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
addressId: '<string>',
name: '<string>',
slippageTolerance: '<string>',
source: [{assetId: '<string>', minAmount: '<string>', maxAmount: '<string>'}]
})
};
fetch('https://api.xentfi.com/v1/addresses/{addressId}/settlement-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"walletId": "<string>",
"slippageTolerance": "<string>",
"isActive": true,
"source": {
"blockchainId": "<string>",
"assetIds": [
"<string>"
],
"minAmount": "<string>",
"maxAmount": "<string>"
},
"destination": {
"blockchainId": "<string>",
"assetId": "<string>",
"address": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}Auto Settlement
Create address settlement rule
POST
/
v1
/
addresses
/
{addressId}
/
settlement-rules
Create address settlement rule
curl --request POST \
--url https://api.xentfi.com/v1/addresses/{addressId}/settlement-rules \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'orgId: <api-key>' \
--data '
{
"addressId": "<string>",
"name": "<string>",
"slippageTolerance": "<string>",
"source": [
{
"assetId": "<string>",
"minAmount": "<string>",
"maxAmount": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
addressId: '<string>',
name: '<string>',
slippageTolerance: '<string>',
source: [{assetId: '<string>', minAmount: '<string>', maxAmount: '<string>'}]
})
};
fetch('https://api.xentfi.com/v1/addresses/{addressId}/settlement-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.xentfi.com/v1/addresses/{addressId}/settlement-rules"
payload = {
"addressId": "<string>",
"name": "<string>",
"slippageTolerance": "<string>",
"source": [
{
"assetId": "<string>",
"minAmount": "<string>",
"maxAmount": "<string>"
}
]
}
headers = {
"apiKey": "<api-key>",
"orgId": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.xentfi.com/v1/addresses/{addressId}/settlement-rules"
payload := strings.NewReader("{\n \"addressId\": \"<string>\",\n \"name\": \"<string>\",\n \"slippageTolerance\": \"<string>\",\n \"source\": [\n {\n \"assetId\": \"<string>\",\n \"minAmount\": \"<string>\",\n \"maxAmount\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("orgId", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
addressId: '<string>',
name: '<string>',
slippageTolerance: '<string>',
source: [{assetId: '<string>', minAmount: '<string>', maxAmount: '<string>'}]
})
};
fetch('https://api.xentfi.com/v1/addresses/{addressId}/settlement-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"walletId": "<string>",
"slippageTolerance": "<string>",
"isActive": true,
"source": {
"blockchainId": "<string>",
"assetIds": [
"<string>"
],
"minAmount": "<string>",
"maxAmount": "<string>"
},
"destination": {
"blockchainId": "<string>",
"assetId": "<string>",
"address": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}Body
application/json
Response
Settlement rule created
Show child attributes
Show child attributes
⌘I

