Skip to main content
POST
Quote Initial Buy

Body

application/json
config_version
integer
default:1
required

Protocol config version

Required range: x >= 0
initial_purchase_percent
number
default:1
required

Percentage of the initial token A amount to purchase (e.g., 1 for 1%)

Example:

1

program_id
string
default:HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o
required

Program ID of the Heaven DEX program

Example:

"HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o"

slippage_pct
number | null
default:0.005

Slippage percentage (e.g., 0.005 for 0.5%)

Example:

0.005

Response

200 - application/json
cost_lamports
integer
required

Cost of the initial purchase in lamports

Required range: x >= 0
cost_sol
number
required

Cost of the initial purchase in SOL

cost_usd
number
required

Cost of the initial purchase in USD

initial_purchase_amount
integer
required

Amount of tokens to purchase in the initial buy

Required range: x >= 0
initial_purchase_amount_ui
number
required

Amount of tokens to purchase in the initial buy in UI format