๐Ÿ‘‹
Welcome to Stokn.io
  • ๐Ÿ‘‹Welcome to Stokn.io
  • Overview
    • ๐Ÿ’กWhat we do?
    • ๐Ÿš€Our Features
      • Wallet as a Service
      • Trading as a Service
      • Staking as a Service
      • Portfolio ESG Scoring
      • KYC, KYB, KYT
    • ๐Ÿ“ฑWhite Label Mobile App
  • USE CASES
    • ๐ŸฆFor NeoBanks, Fintechs, Asset Managers
    • ๐Ÿ‘จโ€๐Ÿ’ผFor Independant wealth managers
    • ๐Ÿ’ฐFor Crypto-Payments
  • HOW TO USE OUR API
  • ๐ŸŽฏOverview
  • ๐Ÿ“Step 1 - User Account Creation
  • ๐Ÿ”Step 2 - User KYC
  • โ„น๏ธStep 3 - User Account Information
  • ๐Ÿ’ตStep 4 - User Deposit & Withdrawal
  • ๐Ÿ”„Step 5 - Crypto conversion
  • ๐Ÿ”Step 6 - User Get Wallet Information
  • ๐Ÿ’ธStep 7 - Dollar Cost Average
  • ๐ŸŒฟStep 8 - Scoring ESG
Powered by GitBook
On this page

Step 7 - Dollar Cost Average

PreviousStep 6 - User Get Wallet InformationNextStep 8 - Scoring ESG

Last updated 1 year ago

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:

OAuth : user_auth

2 - The following endpoint, allows you to consult the active DCAs on an AccountId:

OAuth : user_auth

3 - Finally, this endpoint will give you the possibility to activate/deactivate a DCA:

OAuth : user_auth

๐Ÿ’ธ
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-06-01T14:49:31.201Z",
      "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"
}
  • POST/v1/dca
  • GET/v1/dca
  • PUT/v1/dca/{id}/{status}
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-06-01T14:49:31.201Z",
    "expiresAt": "2025-06-01T14:49:31.201Z",
    "headers": {
      "ANY_ADDITIONAL_PROPERTY": {}
    },
    "claims": {
      "ANY_ADDITIONAL_PROPERTY": {}
    },
    "id": "text",
    "issuer": "text",
    "notBefore": "2025-06-01T14:49:31.201Z",
    "subject": "text",
    "audience": [
      "text"
    ]
  },
  "view": {
    "quantity": 1,
    "from": "text",
    "to": "text",
    "frequency": "DAILY"
  }
}
200

OK

{
  "success": true,
  "data": {
    "accountId": "text",
    "id": "text",
    "creationTs": "2025-06-01T14:49:31.201Z",
    "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"
}
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-06-01T14:49:31.201Z",
  "expiresAt": "2025-06-01T14:49:31.201Z",
  "headers": {
    "ANY_ADDITIONAL_PROPERTY": {}
  },
  "claims": {
    "ANY_ADDITIONAL_PROPERTY": {}
  },
  "id": "text",
  "issuer": "text",
  "notBefore": "2025-06-01T14:49:31.201Z",
  "subject": "text",
  "audience": [
    "text"
  ]
}
200

OK

{
  "success": true,
  "data": {
    "accountId": "text",
    "id": "text",
    "creationTs": "2025-06-01T14:49:31.201Z",
    "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"
}