Notification of stake addresses tracking via Webhook, API (Announcement of webhook activity payment stake addresses)
Note: Create an account before using the APIs
- Create an account:
Mainnet
https://dconecrypto.finance
Network: Mainnet
Endpoint: https://dconecrypto-mainnet.dconecrypto.finance/
Authorization: Bearer {{accessToken}}
Example api request:
- Required field: userNameOrEmailAddress , password
curl --location '{{domain}}/api/TokenAuth/Authenticate' \
--header 'Content-Type: application/json' \
--data '{
"userNameOrEmailAddress": "",
"password": "",
"rememberClient": true
}'
Example api Authenticate responses
{
"accessToken": "string",
"encryptedAccessToken": "string",
"expireInSeconds": 0,
"shouldResetPassword": true,
"passwordResetCode": "string",
"userId": 0,
"requiresTwoFactorVerification": true,
"twoFactorAuthProviders": [
"string"
],
"twoFactorRememberClientToken": "string",
"returnUrl": "string",
"refreshToken": "string",
"refreshTokenExpireInSeconds": 0
}
Once a payment is detected in the stake address, it will be activated and the webhook call will work
Example api request:
curl --location -g '{{domain}}/api/services/app/DC_WebhookWallets/CreateOrEdit' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
"webhookname": "",
"webhookDescription": "",
"webhookUrl": "https://webhook.site/9ad3f909-93b1-42da-918d-19a33445b3f2",
"webhookStakeAddress": "stakexxxxxxxxxxxxx",
"webhookStatus": true,
"userId": 0,
"id": ""
}'
Get a list of all webhooks connected to the system
Example api request:
curl --location -g '{{domain}}/api/services/app/DC_WebhookWallets/GetAll' \
--header 'Authorization: Bearer {{accessToken}}' \
--data ''
Example api response:
{
"result": {
"totalCount": 1,
"items": [
{
"dC_WebhookWallet": {
"webhookname": "Webhookname",
"webhookUrl": "https://webhook.site/9ad3f909-93b1-42da-918d-19a33445b3f2",
"webhookStatus": false,
"userId": 0,
"id": "d205f25a-72b6-4e0e-c9c8-08db1614d234"
},
"userName": "dcone"
}
]
},
"targetUrl": null,
"success": true,
"error": null,
"unAuthorizedRequest": false,
"__abp": true
}
Get a list of all webhooks connected to the system
Example api request:
curl --location -g '{{domain}}/api/services/app/DC_WebhookWallets/GetDC_WebhookWalletForEdit?Id=d205f25a-72b6-4e0e-c9c8-08db1614d234' \
--header 'Authorization: Bearer {{accessToken}}' \
--data ''
Remove 1 webhook information and don't trigger notification when stake address payment
Example api request:
curl --location -g '{{domain}}/api/services/app/DC_WebhookWallets/Delete?null=d205f25a-72b6-4e0e-c9c8-08db1614d234' \
--header 'Authorization: Bearer {{accessToken}}' \
--data ''
Get the userId variable and put in the userId input parameter in the "CreateOrEdit" api
curl --location -g '{{domain}}/api/services/app/DC_WebhookWallets/GetAllUserForTableDropdown' \
--header 'Authorization: Bearer {{accessToken}}' \
--data ''
{
"result": null,
"targetUrl": null,
"success": true,
"error": null,
"unAuthorizedRequest": false,
"__abp": true
}
{
"result": null,
"targetUrl": null,
"success": false,
"error": {
"code": 0,
"message": "You have exceeded your account limit",
"details": null,
"validationErrors": null
},
"unAuthorizedRequest": false,
"__abp": true
}
Note: Trigger webhook callback (result webhookUrl
in CreateOrEdit
api) and data result returned
[
{
"total_balanceOld": 26838691,
"total_balance": 16663070,
"utxo": 16593105,
"rewards": 15465007,
"withdrawals": 15395042,
"rewards_available": 69965,
"StakeAddress": "stake1uxa5t2u5j43gv03esw8s726v8ul4c6r3g0d7x97cr2seeag0sa0dk"
}
]