Create Contract Order¶
Endpoint¶
Parameters¶
Path Parameters¶
| Field | Type | Description |
|---|---|---|
| b_id Required | String | Business line ID |
Body Parameters¶
| Field | Type | Description |
|---|---|---|
order_no Required | String | Order number (max 50 characters) |
from_wallet_code Required | String | From Wallet ID |
from_address Required | String | From address |
to_address Required | String | Contract address. Required for EVM-based chains. |
amount Required | Decimal | Amount |
chain Required | String | Cactus chain name Allowed Value: Refer to Network Symbol column in Supported Token |
contract_data Required | String | Contract Data (Hexadecimal Bytes) |
| gas_limit Required | String | Refer to the contract’s suggested gas limit for EVM-based chains. |
| fee_rate_level Optional | String | ETH series rate level Allowed values: NORMAL, HIGHER, LOW, CUSTOM |
| fee_rate Optional | Decimal | Provide the rate when using the CUSTOM for fee_rate_level. The valid range can be obtained from the Get Current Fee Rate Range API. For EIP1559 series, this parameter corresponds to the MaxFeeRate. |
| max_fee_per_gas Optional | Decimal | Max fee |
| max_priority_fee_per_gas Optional | Decimal | Priority fee |
| description Optional | String | Order description (max 50 characters) |
| Field | Type | Description |
|---|---|---|
order_no Required | String | Order number (max 50 characters) |
from_wallet_code Required | String | From Wallet ID |
from_address Required | String | From address |
chain Required | String | Cactus chain name Allowed Value: SOLANA |
amount Required | Decimal | Allowed Value: 0 |
| contract_instructions Required | List | Solana smart contract instructions |
| sign_trans Optional | Boolean | Signed Solana Transactions. If this field is set to true, the transaction will be signed only and will not be broadcast to the blockchain. To retrieve the signature result, use the Get Smart Contract Transaction Details API and check the contract_instructions field. |
| description Optional | String | Order description (max 50 characters) |
| Field | Type | Description |
|---|---|---|
order_no Required | String | Order number (max 50 characters) |
from_wallet_code Required | String | From Wallet ID |
from_address Required | String | From address |
amount Required | Decimal | Allowed Value: 0 |
chain Required | String | Cactus chain name Allowed Value: STELLAR |
contract_data Required | String | Stellar contract data (JSON). Contains two fields: opts (the transaction initiator address, used for signing authentication, fee deduction, and sequence control) and xdr (XDR-encoded transaction envelope). Refer to the request body example. |
| description Optional | String | Order description (max 50 characters) |
| fee_rate_level Optional | String | Allowed values: NORMAL, HIGHER, LOW, CUSTOM |
| fee_rate Optional | Decimal | Provide the rate when using the CUSTOM for fee_rate_level. The valid range can be obtained from the Get Current Fee Rate Range API. |
| Field | Type | Description |
|---|---|---|
order_no Required | String | Order number (max 50 characters) |
from_wallet_code Required | String | From Wallet ID |
from_address Required | String | From address |
chain Required | String | Cactus chain name Allowed Value: SUI |
amount Required | Decimal | Amount Allowed Value: 0 |
| contract_data_json Required | String | The transaction data in JSON format |
contract_data Optional | String | SUI Transaction Block Bytes (Base64 Transaction Data) |
to_address Optional | String | Recipient contract address |
| description Optional | String | Order description (max 50 characters) |
Request Body Example¶
{
"order_no": "D666666000001",
"from_wallet_code": "CHETH6454313788",
"from_address": "0x018050e30e4bf1cf79bb8b8c2297aa750da04544",
"to_address": "0xb597cd8d3217ea6477232f9217fa70837ff667af",
"amount": "0",
"chain": "ETH",
"contract_data": "0x095ea7b3000000000000000000000000f2fbf9a6710afda1c4aab2e922de9d69e0c97fd2ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"gas_price_level": "NORMAL",
"gas_price": null,
"gas_limit": 52418,
"description": "Contract call test"
}
{
"order_no": "SOLANA0001",
"from_wallet_code": "DeFiSOL4504203001",
"from_address": "7TsrCQwS7Y8WNhaaSYtY1z3PFDKhouQhZiLDFfKN5KkX",
"amount": "0",
"chain": "SOLANA",
"contract_instructions":[
{
"address_table_lookups": [],
"compiled_instructions": [
{
"account_key_indexes": [
0,
1
],
"data": "2Bxs412MvVNQj111",
"program_id_index": 2
}
],
"header": {
"num_readonly_signed_accounts": 0,
"num_readonly_unsigned_accounts": 1,
"num_required_signatures": 1
},
"recent_blockhash": null,
"sequence": 0,
"signatures": [
"1111111111111111111111111111111111111111111111111111111111111111"
],
"static_account_keys": [
"FsYr6MJTe4HuzPw91cFDWJqR7WLtbsT7xJjPeqHVMPAa",
"ECaYNZoMuDeUsuowGJSKgzzTm5pnupxiDbtbdLTTwYMa",
"11111111111111111111111111111111"
],
"version": -1
}
],
"description": "Contract call for SOLANA"
}
If recent_blockhash is provided, the transaction must be broadcast within 60 seconds of when that blockhash was obtained or it will expire, thus ensure processes like order submission and approval are process promptly.\
\
If recent_blockhash is not provided (null), Cactus will automatically insert a valid blockhash before broadcasting, and the transaction is not affected by processing delays.
{
"order_no": "STELLAR0001",
"from_wallet_code": "DeFiXLM0000000001",
"from_address": "GAC2IWR3ETHSJKOQUIRU7PIFE6ZFUQKKGLY5SH3REKB3DTXMSQRC2MRZ",
"amount": "0",
"chain": "STELLAR",
"contract_data": "{\"opts\":{\"address\":\"GAC2IWR3ETHSJKOQUIRU7PIFE6ZFUQKKGLY5SH3REKB3DTXMSQRC2MRZ\",\"network_passphrase\":\"Test SDF Network ; September 2015\"},\"xdr\":\"AAAAAgAAAAAFpFo7JM8kqdCiI0+9BSeyWkFKMvHZH3Eig7HO7JQiLQBwEBkAGFZXAAAAEAAAAAEAAAAAAAAAAAAAAABpxEIWAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABiBqPDN6w3AqtjeChlK9EkpFXvfiHkiIhITjRV4o74c4AAAAGc3VibWl0AAAAAAAEAAAAEgAAAAAAAAAABaRaOyTPJKnQoiNPvQUnslpBSjLx2R9xIoOxzuyUIi0=\"}"
}
Ensure the entire contract_data field JSON object is serialised as a string when submitting.
{
"order_no": "TS900900000001",
"from_wallet_code": "DeFiSUI2422761342",
"from_address": "0xa806a02b8216f2a8635d8cc7b042f7b394c45bf2c11b6f9671f39c22e483d947",
"chain": "SUI",
"amount": "0",
"contract_data_json": "{\"version\":2,\"sender\":\"0xffd1bcf6cb5b9ed32f7ab........\",\"expiration\":null,\"gasData\":{\"budget\":\"5000000\",\"price\":\"1000\",\"owner\":null,\"payment\":[{\"objectId\":\"0x37afef2ce0014852f4b038dbe20c6fc4b469526f3f365da982a93050c6731497\",\"version\":\"799396354\",\"digest\":\"6G4zV1waF2pPAgqjy5hAmZa6yNPqsEvAgbixiaVjREmm\"}]},\"inputs\":[{\"Object\":{\"SharedObject\":{\"objectId\":\"0x59acb288bfbfb44d9a127e088b00c745733c70306f0b9fcce5d43daaadfdb298\",\"initialSharedVersion\":534215830,\"mutable\":false}}},{\"Pure\":{\"bytes\":\"FiesEE8JAsE68iAB87GnoA7bas79uWkZErodsYIgbh0=\"}},{\"Pure\":{\"bytes\":\"YEOZOwAAAAA=\"}},{\"Object\":{\"SharedObject\":{\"objectId\":\"0x0000000000000000000000000000000000000000000000000000000000000006\",\"initialSharedVersion\":1,\"mutable\":false}}}],\"commands\":[{\"MoveCall\":{\"package\":\"0x9c1718dd14d7d366d9296269b8ba830fccb3d2ea30263b8eaf5609c9ec224b3e\",\"module\":\"mtoken\",\"function\":\"request_mint_to\",\"typeArguments\":[\"0x7b4300310b5d9680105a6e6ec1484e8cb94e779cc261c21dd6c3b6d6416679f1::mt::MT\"],\"arguments\":[{\"Input\":0},{\"Input\":1},{\"Input\":2},{\"Input\":3}]}}],\"digest\":\"4FvMAJzBVCfiq59Ny2bMFQrodBW66TfHMDw3QmziuNJc\"}",
"contract_data": "",
"to_address": "",
"description": ""
}
Response¶
Response Body¶
| Field | Type | Description |
|---|---|---|
| code | Integer | Response code (0 = success) |
| message | String | Response message |
| successful | Boolean | Whether the request was successful |
| data | Object | Response data (see data object details below) |
data (object)
| Field | Type | Description |
|---|---|---|
| OrderNo | String | Order number |