Skip to content

💎 DPX API

DPX API is an application programming interface for interacting with the DPX System

🔰 Endpoint

The endpoint of DPX API is accessible at https://dpx.developix.ir/api. If deployed on a custom server, it could be accessed at ADDRESS/api.

⚙️ Supported Methods

Generally speaking, the API accepts GET or POST http methods based on the action you are requesting, some actions accept both methods that are specified below, but no action accepts any other method than POST and GET.

⚠️ Please note that the POST method parameters must be in the format of Form Data.

✨ Methods

💠 Balance

Description: Retrieves the balance of the given wallet
Path: /balance
Supported Methods: GET
Return: Balance (Float)
Params: /balance/{wallet}

💠 Transaction

Description: Retrieves the information of the given TransactionID
Path: /transaction
Supported Methods: GET
Return: Transaction Object
Params: /transaction/{transactionId}

💠 Transactions

Description: Retrieves the transactions with given criteria (maximum of 256 items)
Path: /transactions
Supported Methods: GET, POST
Return: Array of Transaction Objects

FieldTypeRequiredDescription
offsetintOptionalSpecifies the offset
departurestringOptionalSpecifies the departure wallet
destinationstringOptionalSpecifies the destination wallet

💠 Transfer

Description: Transfers the specified amount from departure wallet to destination wallet
Path: /transfer
Supported Methods: POST
Return: Transaction Object

FieldTypeRequiredDescription
amountfloatRequiredSpecifies the amount
departurestringRequiredSpecifies the departure wallet
secretstringRequiredSpecifies the secret of the departure wallet
destinationstringRequiredSpecifies the destination wallet

💠 Verify

Description: Verifies if the given credentials are valid and transfer can be done with given credentials
Path: /verify
Supported Methods: POST
Return: Validity (Boolean)

FieldTypeRequiredDescription
walletstringRequiredSpecifies the wallet
secretstringRequiredSpecifies the secret of the wallet

💠 Generate

Description: Generates a new wallet
Path: /generate
Supported Methods: POST
Return: Wallet & Secret (JSON Object)

💠 Revoke

Description: Revokes the secret of the given wallet
Path: /revoke
Supported Methods: POST
Return: New Secret (String)

FieldTypeRequiredDescription
walletstringRequiredSpecifies the wallet
secretstringRequiredSpecifies the secret of the wallet

🧩 Object Types

💠 Transaction Object

Description: Table below describes a transaction object

FieldTypeDescription
transactionstringSpecifies the transaction id
departurestringSpecifies the departure wallet
destinationstringSpecifies the destination wallet
amountfloatSpecifies the amount
feefloatSpecifies the fee
timestampintSpecifies the timestamp

🏳️ Response Types

Generally, you would receive one of the two following JSON-Serialized responses, a Success or a Failure

✅ Success

json
{
    "status": "success",
    "result": RETURN_VALUE
}
{
    "status": "success",
    "result": RETURN_VALUE
}

❌ Failed

json
{
    "status": "error",
    "error": "error-code",
    "info": "Error description in English"
}
{
    "status": "error",
    "error": "error-code",
    "info": "Error description in English"
}