💸Step 7 - Dollar Cost Average
As you may already know, Dollar Cost Average (DCA) is the possibilité pour the User to program their investment.
For instance, they will be able to buy a certain amount of the token of their choice on a regular basis (daily, weekly or monthly).
1 - The following endpoints, allows you to create a new DCA by specifying the original token, the destination token, the frequency of the transactions:
post
Authorizations
Body
Responses
200
OK
*/*
post
POST /v1/dca HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 359
{
"jwt": {
"tokenValue": "text",
"issuedAt": "2025-07-01T15:37:13.251Z",
"expiresAt": "2025-07-01T15:37:13.251Z",
"headers": {
"ANY_ADDITIONAL_PROPERTY": {}
},
"claims": {
"ANY_ADDITIONAL_PROPERTY": {}
},
"id": "text",
"issuer": "text",
"notBefore": "2025-07-01T15:37:13.251Z",
"subject": "text",
"audience": [
"text"
]
},
"view": {
"quantity": 1,
"from": "text",
"to": "text",
"frequency": "DAILY"
}
}
200
OK
{
"success": true,
"data": {
"accountId": "text",
"id": "text",
"creationTs": "2025-07-01T15:37:13.251Z",
"status": "ACTIVE",
"quantity": 1,
"fromCoin": {
"slug": "text",
"name": "text",
"logoUrl": "text",
"availableNetworks": [
"text"
]
},
"toCoin": {
"slug": "text",
"name": "text",
"logoUrl": "text",
"availableNetworks": [
"text"
]
},
"frequency": "DAILY"
},
"errorCode": 1,
"errorMessage": "text"
}
OAuth : user_auth
2 - The following endpoint, allows you to consult the active DCAs on an AccountId:
get
Authorizations
Query parameters
Responses
200
OK
*/*
get
GET /v1/dca?jwt=[object+Object] HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
200
OK
{
"success": true,
"data": [
{
"accountId": "text",
"id": "text",
"creationTs": "2025-07-01T15:37:13.251Z",
"status": "ACTIVE",
"quantity": 1,
"fromCoin": {
"slug": "text",
"name": "text",
"logoUrl": "text",
"availableNetworks": [
"text"
]
},
"toCoin": {
"slug": "text",
"name": "text",
"logoUrl": "text",
"availableNetworks": [
"text"
]
},
"frequency": "DAILY"
}
],
"errorCode": 1,
"errorMessage": "text"
}
OAuth : user_auth
3 - Finally, this endpoint will give you the possibility to activate/deactivate a DCA:
put
Authorizations
Path parameters
idstringRequired
statusstring · enumRequiredPossible values:
Body
tokenValuestringOptional
issuedAtstring · date-timeOptional
expiresAtstring · date-timeOptional
idstringOptional
issuerstring · urlOptional
notBeforestring · date-timeOptional
subjectstringOptional
audiencestring[]Optional
Responses
200
OK
*/*
put
PUT /v1/dca/{id}/{status} HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 283
{
"tokenValue": "text",
"issuedAt": "2025-07-01T15:37:13.251Z",
"expiresAt": "2025-07-01T15:37:13.251Z",
"headers": {
"ANY_ADDITIONAL_PROPERTY": {}
},
"claims": {
"ANY_ADDITIONAL_PROPERTY": {}
},
"id": "text",
"issuer": "text",
"notBefore": "2025-07-01T15:37:13.251Z",
"subject": "text",
"audience": [
"text"
]
}
200
OK
{
"success": true,
"data": {
"accountId": "text",
"id": "text",
"creationTs": "2025-07-01T15:37:13.251Z",
"status": "ACTIVE",
"quantity": 1,
"fromCoin": {
"slug": "text",
"name": "text",
"logoUrl": "text",
"availableNetworks": [
"text"
]
},
"toCoin": {
"slug": "text",
"name": "text",
"logoUrl": "text",
"availableNetworks": [
"text"
]
},
"frequency": "DAILY"
},
"errorCode": 1,
"errorMessage": "text"
}
OAuth : user_auth
Last updated