Wallet
This section details resources that pertains to the wallet feature, retrieving wallet information, transaction details etc. When a user signs up on the chainsite, wallets are auto-generated for said
Last updated
This section details resources that pertains to the wallet feature, retrieving wallet information, transaction details etc. When a user signs up on the chainsite, wallets are auto-generated for said
Last updated
Retrieves the user's wallet information, including total balance and details of all cryptocurrency holdings.
Request
No request body, query and path parameters for this endpoint
Response
The response contains the following structure:
status: Indicates if the request was successful
message: A brief status message
data: Contains the wallet information with the following properties:
totalBalance: The cumulative balance of all wallets in USD
value: The total value in USD (appears to be a duplicate of totalBalance)
wallets: An array of wallet objects representing different cryptocurrencies
Each wallet object in the array contains:
id: Unique identifier for the wallet/cryptocurrency
amount: The quantity of cryptocurrency held, formatted as a string with decimal precision
usdValue: The value of the cryptocurrency in USD
address: The blockchain address associated with the wallet
coin: The ticker symbol of the cryptocurrency
icon: URL to the cryptocurrency's icon image
If no cryptocurrency is held, the amount will be "0.000000" and the usdValue will be 0.
OK
This endpoint retrieves details of a specific coin from the user's wallet.
Request
Method: GET
URL: {{baseUrl}}/v1/wallet/coin/:coin
Response
Upon a successful request, the server will respond with a status code of 200 and a JSON object containing the following properties:
status
(string): Indicates the status of the response.
message
(string): A message from the server.
data
(object): Contains the details of the coin:
_id
(string): The unique identifier of the coin.
coin
(string): The name of the coin.
amount
(number): The amount of the coin in the wallet.
usdValue
(number): The value of the coin in USD.
icon
(string): URL to the icon of the coin.
usdc
OK
This endpoint makes an HTTP GET request to retrieve exchange transaction data.
Request
This request does not require a request body.
Response
status
(string): The status of the response.
message
(string): A message related to the response status.
data
(object): An object containing exchange transaction data with keys for various currencies such as usdc
, avax
, tech
, gogopool
, avalaunch
, benqi
, joe
, and coq-inu
.
usdc
(number): The amount of USDC in the exchange transaction.
avax
(number): The amount of AVAX in the exchange transaction.
tech
(number): The amount of TECH in the exchange transaction.
gogopool
(number): The amount of GOGOPOOL in the exchange transaction.
avalaunch
(number): The amount of AVALAUNCH in the exchange transaction.
benqi
(number): The amount of BENQI in the exchange transaction.
joe
(number): The amount of JOE in the exchange transaction.
coq-inu
(number): The amount of COQ-INU in the exchange transaction.
OK
This endpoint retrieves a list of withdrawal records.
Request
No request body is required for this endpoint.
Response
The response will be a JSON object with the following schema:
status
(string): The status of the response.
message
(string): Any additional message related to the response.
data
(object): An object containing withdrawal data.
pages
(number): The total number of pages.
page
(number): The current page number.
total
(number): The total number of withdrawal records.
data
(array): An array of withdrawal records, each containing the following fields:
_id
(string): The unique identifier of the withdrawal record.
owner
(string): The owner of the withdrawal.
coin
(string): The cryptocurrency used for the withdrawal.
address
(string): The withdrawal address.
amount
(number): The amount of cryptocurrency withdrawn.
usdValue
(number): The value of the withdrawal in USD.
usdRate
(number): The exchange rate of the cryptocurrency to USD.
status
(string): The status of the withdrawal.
retryCount
(number): The number of retry attempts.
errMsg
(array): An array of error messages, if any.
createdAt
(string): The timestamp of creation.
updatedAt
(string): The timestamp of the last update.
OK
Request
Endpoint: GET {{baseUrl}}/v1/transaction
This endpoint retrieves a paginated list of transactions for the authenticated user.
Response
When the request is successful, the API will return a response with the following structure:
Status Field: The status
field indicates the outcome of the request. A value of "success" confirms that the operation was executed without errors.
Message Field: The message
field provides a human-readable description of the result. A value of "OK" indicates that the request completed successfully.
Data Object: The data
field contains the main payload of the response with the following components:
Transactions Array: The transactions
array contains a list of transaction objects, each representing a financial transaction in the system. Each transaction includes:
Transaction ID: The _id
field provides a unique identifier for the transaction.
Owner: The owner
field contains the user ID of the account owner associated with this transaction.
Amount: The amount
field specifies the transaction amount in the cryptocurrency's native units.
Coin Information: The coin
object provides comprehensive details about the cryptocurrency involved:
Basic identifiers: _id
, name
, symbol
Visual representation: icon
URL to the cryptocurrency's logo
Technical details: reference
, contractAddress
, decimal
(precision)
Blockchain information: rpcChainId
Status indicators: isToken
, active
, order
Timestamps: createdAt
, updatedAt
Chain: The chain
field contains the blockchain identifier on which the transaction occurred.
Currency: The currency
field provides the lowercase reference name of the cryptocurrency.
USD Value: The usdValue
field shows the equivalent value in US dollars at the time of the transaction.
Exchange Rate: The rate
field indicates the conversion rate between the cryptocurrency and USD.
Description: The description
field contains a human-readable explanation of the transaction purpose.
Transaction Type: The type
field categorizes the transaction (e.g., "deposit", "withdrawal").
Method: The method
field specifies how the transaction was processed (e.g., "payout", "sent").
Status: The status
field indicates the current state of the transaction (e.g., "failed", "completed").
Fee Indicators: Boolean fields isFee
, isPaktFee
, and isExternal
provide information about the fee structure.
Timestamps: The createdAt
and updatedAt
fields show when the transaction was created and last modified.
Transaction Data: The tx
field may contain JSON-formatted transaction details including sender and receiver addresses.
Response Data: The responseData
field may contain detailed information returned by the blockchain, including transaction hash, block information, gas usage, and contract interaction details.
Pagination Information: The response includes pagination details to help navigate through multiple pages of transactions:
Total Pages: The pages
field indicates the total number of pages available.
Current Page: The page
field shows which page of results is being displayed.
Page Size: The limit
field specifies how many transactions are returned per page.
OK
Retrieves detailed information about a specific transaction by its unique identifier.
Request
Path parameter
id
: Unique transaction identifier
:Uni
Response
The response provides comprehensive information about a transaction, including its status, associated cryptocurrency details, financial values, and processing information.
The response begins with a status indicator that signifies the success or failure of the API call:
status
: Indicates if the API request was successful (returns "success" or "error")
message
: Provides a brief message about the result of the request (e.g., "OK")
Transaction Details
The core transaction data is contained in the data
object with the following key information:
Basic Information:
Transaction ID: A unique identifier for the transaction (_id
), formatted as a MongoDB ObjectId.
Owner ID: The unique identifier of the user who owns or initiated this transaction (owner
).
Amount: The quantity of cryptocurrency involved in the transaction (amount
), represented as a decimal number.
USD Value: The equivalent value in US dollars (usdValue
), calculated based on the cryptocurrency's exchange rate.
Rate: The exchange rate used for the conversion to USD (rate
), specified as a string to preserve decimal precision.
Description: A text description explaining the purpose of the transaction (description
).
Transaction Classification:
Type: Categorizes the transaction as either "deposit" (incoming) or "withdrawal" (outgoing).
Method: Indicates how the transaction was executed (e.g., "payout", "transfer", "exchange").
Status: The current state of the transaction, which can be:
"pending": Transaction is being processed
"completed": Transaction has successfully completed
"failed": Transaction encountered an error and did not complete
"cancelled": Transaction was cancelled before completion
Fee Indicators: Boolean flags indicating whether the transaction represents a fee (isFee
) or a platform fee (isPaktFee
).
Cryptocurrency Information:
The coin
object contains detailed information about the cryptocurrency used in the transaction:
Coin ID: Unique identifier for the cryptocurrency (_id
).
Name: Full name of the cryptocurrency (e.g., "GOGOPOOL").
Symbol: Trading symbol or ticker of the cryptocurrency (e.g., "GGP").
Icon: URL to the cryptocurrency's logo image.
Reference: A reference code or slug for the cryptocurrency.
Contract Address: The blockchain contract address for the cryptocurrency (for tokens).
Decimal: The number of decimal places used to represent the cryptocurrency (typically "18" for ERC-20 tokens).
Token Status: Whether the cryptocurrency is a token (isToken
) rather than a native coin.
Chain ID: The RPC chain ID of the blockchain the token operates on (rpcChainId
).
Order: Display priority or sorting order.
Active Status: Whether the cryptocurrency is actively supported.
Creation and Update Dates: Timestamps for when the cryptocurrency was added to the system and last updated.
Blockchain Information:
Chain: Reference to the blockchain network used for the transaction.
Currency: The lowercase reference code for the cryptocurrency.
Timestamps:
Created At: When the transaction was initially created in the system.
Updated At: When the transaction was last modified.
67ba837c5ae86e39181696bd
OK
This endpoint allows you to export the secret key associated with a wallet.
Request
code
(string) - The verification code for exporting the secret key.
password
(string) - The password associated with the wallet.
Response
status
(string) - The status of the response.
message
(string) - A message related to the response.
data
(object)
secretKey
(string) - The exported secret key.
walletAddress
(string) - The wallet address associated with the secret key.
{"code":"993997","password":"1234567890@Abcde"}
OK
This endpoint allows the user to initiate a withdrawal of a specified amount of a particular coin to a given address.
Request
amount
(number): The amount of the coin to be withdrawn.
coin
(string): The type of coin to be withdrawn.
address
(string): The destination address for the withdrawal.
password
(string): The user's password for authentication.
Response
The response will be a JSON object with the following properties:
status
(string): The status of the withdrawal request.
message
(string): Additional information or error message.
data
(object): The data object containing the following property:
withdrawalId
(string): The ID of the withdrawal transaction.
{"amount":100,"coin":"USDC","address":"0xca2d656f99dc337dE84785c525745426157657B6","password":"1234567890@Abcd"}
OK