Create Transaction
GraphQL endpoint to add a transaction corresponding to an existing wallet address
Mutation:
mutation CreateCustomUserTransaction(
$primaryWalletAddress: String,
$walletAddress: String,
$transactionType: CustomCRMTransactionTypeEnum!,
$amount: Float!,
$amountType: String,
$currencyValue: Float!,
$currencyType: CustomCRMTransactionCurrencyTypeEnum!,
$timestamp: String!,
$details: String,
$transactionHash: String,
$chainId: Int
) {
createCustomUserTransaction(
primaryWalletAddress: $primaryWalletAddress
walletAddress: $walletAddress
transactionType: $transactionType
amount: $amount
amountType: $amountType
currencyValue: $currencyValue
currencyType: $currencyType
timestamp: $timestamp
details: $details
transactionHash: $transactionHash
chainId: $chainId
) {
status
transactionId
errors{
message
code
}
}
}
Variables:
**primaryWalletAddress**
(required)
Enum for transaction type: BUY, SEND, MOBILE_APP_SWAP, WEB_APP_SWAP, PRESALE_BUY
Enum for Amount Type : ETH, BNB (optional and default null)
(This is being changed to String/Null)
Enum for Currency Type: USD, EUR (optional and default USD)
Example json payload:
{
"primaryWalletAddress": "14324",
"walletAddress": "14324",
"transactionType": "BUY",
"amount": 10.0,
"amountType": "ETH",
"currencyValue": 10000,
"currencyType": "USD",
"timestamp": "01-01-2024",
"transactionHash": "tx_id_here",
"chainId": 2
}
Errors:
Code: 404 (User for wallet address not found)
Code: 400 (Testnet transactions not allowed)
Code: 409 (Transaction hash, chain id combination already exists)