Build create order unsigned transaction for Solana (v1.2)
Supported on: Ethereum Base Solana BNB Chain Unichain Arbitrum Avalanche ZKsync Gnosis Optimism Polygon Linea Sonic
Parameters
quoteId
* string queryId of the quote received from /receive
serialize
boolean queryWhen enabled -> receive ready to sign transaction, otherwise receive instructions and accounts
versionedTransaction
boolean queryWhen enabled and serialize==true -> receive serialized VersionedTransaction instead of Message0
isMobile
string queryEnabled flag allows to save quote for Mobile History
Request Body
Request body for building a Solana order
secretsHashList
* array Array of secret hashes - [keccak256(secret)] or keccak256(secret[idx])[]
items
string receiver
string Receiver addess on dst chain
preset
string (Enum)Preset for order price curve. By default: recommended preset from a quote
fast
slow
medium
custom
priorityFee
string Priority price per compute unit in microlamports
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const axios = require('axios');
async function httpCall() {
const url =
'https://api.1inch.com/fusion-plus/quoter/v1.2/quote/build/solana';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {
secretsHashList: [
'0x4978f2faaaa18851f901395f9fa37b669d176b7909882feaccddc2f668184279',
],
receiver: '0x1b3cb81e51011b549d78bf720b0d924ac763a7c2',
preset: 'fast',
priorityFee: '1000',
};
try {
const response = await axios.post(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
200
400
default
200 response doesn’t have payload.