# Table of Contents - [Challenge - Flashnet](#challenge-flashnet) - [Check Clawback Eligibility - Flashnet](#check-clawback-eligibility-flashnet) - [Verify - Flashnet](#verify-flashnet) - [Clawback Funds - Flashnet](#clawback-funds-flashnet) - [Get Integrator Fees - Flashnet](#get-integrator-fees-flashnet) - [Get Pool Host Fees - Flashnet](#get-pool-host-fees-flashnet) - [Get Host Fees - Flashnet](#get-host-fees-flashnet) - [Get Host - Flashnet](#get-host-flashnet) - [Register Host - Flashnet](#register-host-flashnet) - [Withdraw Host Fees - Flashnet](#withdraw-host-fees-flashnet) - [Get Host Fee Withdrawal History - Flashnet](#get-host-fee-withdrawal-history-flashnet) - [Get Pool Integrator Fees - Flashnet](#get-pool-integrator-fees-flashnet) - [Get Liquidity Positions - Flashnet](#get-liquidity-positions-flashnet) - [Settlement Health Check (uses grpc.health.v1 Health/Check) - Flashnet](#settlement-health-check-uses-grpc-health-v1-health-check-flashnet) - [Simulate Add Liquidity - Flashnet](#simulate-add-liquidity-flashnet) - [Remove Liquidity - Flashnet](#remove-liquidity-flashnet) - [Withdraw Integrator Fees - Flashnet](#withdraw-integrator-fees-flashnet) - [Create CP Pool - Flashnet](#create-cp-pool-flashnet) - [Simulate Remove Liquidity - Flashnet](#simulate-remove-liquidity-flashnet) - [Get Integrator Fee Withdrawal History - Flashnet](#get-integrator-fee-withdrawal-history-flashnet) - [Confirm Initial Deposit - Flashnet](#confirm-initial-deposit-flashnet) - [Add liquidity - Flashnet](#add-liquidity-flashnet) - [List Pools - Flashnet](#list-pools-flashnet) - [Get LP Position - Flashnet](#get-lp-position-flashnet) - [Get Pool - Flashnet](#get-pool-flashnet) - [Create Bonding Pool - Flashnet](#create-bonding-pool-flashnet) - [Execute Route Swap - Flashnet](#execute-route-swap-flashnet) - [Simulate Swap - Flashnet](#simulate-swap-flashnet) - [Simulate Route Swap - Flashnet](#simulate-route-swap-flashnet) - [Get User Swaps - Flashnet](#get-user-swaps-flashnet) - [Execute Swap - Flashnet](#execute-swap-flashnet) - [Get Swaps - Flashnet](#get-swaps-flashnet) - [Get Pool Swaps - Flashnet](#get-pool-swaps-flashnet) - [Introducing Flashnet - Flashnet](#introducing-flashnet-flashnet) - [Architecture - Flashnet](#architecture-flashnet) - [Trust Model - Flashnet](#trust-model-flashnet) - [AMM - Flashnet](#amm-flashnet) - [How it works - Flashnet](#how-it-works-flashnet) - [Setup - Flashnet](#setup-flashnet) - [Config & Gating - Flashnet](#config-gating-flashnet) - [Pool Creation - Flashnet](#pool-creation-flashnet) - [Liquidity - Flashnet](#liquidity-flashnet) - [Hosts - Flashnet](#hosts-flashnet) - [Fees - Flashnet](#fees-flashnet) - [Swap History - Flashnet](#swap-history-flashnet) - [Querying Pools - Flashnet](#querying-pools-flashnet) - [Advanced Topics - Flashnet](#advanced-topics-flashnet) - [Route Swaps - Flashnet](#route-swaps-flashnet) - [Swaps - Flashnet](#swaps-flashnet) - [How it works - Flashnet](#how-it-works-flashnet) - [How it works - Flashnet](#how-it-works-flashnet) - [Trading Fees - Flashnet](#trading-fees-flashnet) - [Vaults - Flashnet](#vaults-flashnet) - [Trust Model - Flashnet](#trust-model-flashnet) - [Trust Model - Flashnet](#trust-model-flashnet) - [Page Not Found](#page-not-found) - [Overview - Flashnet](#overview-flashnet) - [Market Data - Flashnet](#market-data-flashnet) - [Creating a Wallet - Flashnet](#creating-a-wallet-flashnet) - [Importing a Wallet - Flashnet](#importing-a-wallet-flashnet) - [Deposits - Flashnet](#deposits-flashnet) - [Withdrawals - Flashnet](#withdrawals-flashnet) - [Orders - Flashnet](#orders-flashnet) --- # Challenge - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/auth/challenge#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Auth Challenge [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Challenge cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/auth/challenge \ --header 'Content-Type: application/json' \ --data '{ "publicKey": "021eec911553028dded1ec644144cd3afee9d9bfe7846af3cf8e6d84f4b3102389" }' 200 example Copy Ask AI { "challenge": "464c4153484e45545f415554485f4348414c4c454e47455f56313a19f51e5e9b50314318517a5e2bb19e5beb94d9c5d74b61068ff458c75a649712", "challengeString": "FLASHNET_AUTH_CHALLENGE_V1:19f51e5e9b50314318517a5e2bb19e5beb94d9c5d74b61068ff458c75a649712", "requestId": "01H8Z0HMVXJN6A8Q9GR1J6Z34E"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / auth / challenge Try it Challenge cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/auth/challenge \ --header 'Content-Type: application/json' \ --data '{ "publicKey": "021eec911553028dded1ec644144cd3afee9d9bfe7846af3cf8e6d84f4b3102389" }' 200 example Copy Ask AI { "challenge": "464c4153484e45545f415554485f4348414c4c454e47455f56313a19f51e5e9b50314318517a5e2bb19e5beb94d9c5d74b61068ff458c75a649712", "challengeString": "FLASHNET_AUTH_CHALLENGE_V1:19f51e5e9b50314318517a5e2bb19e5beb94d9c5d74b61068ff458c75a649712", "requestId": "01H8Z0HMVXJN6A8Q9GR1J6Z34E"} #### Body application/json Public key for which to generate an authentication challenge Request body for initiating authentication challenge. This request starts the authentication flow by requesting a challenge string that must be signed with the user's private key. [​](https://docs.flashnet.xyz/api-reference/auth/challenge#body-public-key) publicKey string required The public key of the user requesting authentication. Must be a valid Bitcoin or Spark public key. Example: `"021eec911553028dded1ec644144cd3afee9d9bfe7846af3cf8e6d84f4b3102389"` #### Response 200 application/json Challenge generated successfully Response containing the challenge string to be signed. The challenge is a hex string composed of an ASCII magic prefix followed by 32 random bytes. The entire byte sequence is what should be signed using the private key corresponding to the provided public key. [​](https://docs.flashnet.xyz/api-reference/auth/challenge#response-challenge) challenge string required The challenge string that must be signed. Hex string of: "FLASHNET\_AUTH\_CHALLENGE\_V1:" || 32 random bytes. Example: `"464c4153484e45545f415554485f4348414c4c454e47455f56313a19f51e5e9b50314318517a5e2bb19e5beb94d9c5d74b61068ff458c75a649712"` [​](https://docs.flashnet.xyz/api-reference/auth/challenge#response-challenge-string) challengeString string required A UTF-8 string version of the challenge suitable for wallets that sign strings. Format: "FLASHNET\_AUTH\_CHALLENGE\_V1:" + hex(random 32 bytes) Example: `"FLASHNET_AUTH_CHALLENGE_V1:19f51e5e9b50314318517a5e2bb19e5beb94d9c5d74b61068ff458c75a649712"` [​](https://docs.flashnet.xyz/api-reference/auth/challenge#response-request-id) requestId string required Unique request identifier for tracking and debugging. Example: `"01H8Z0HMVXJN6A8Q9GR1J6Z34E"` Was this page helpful? YesNo [Verify\ \ Next](https://docs.flashnet.xyz/api-reference/auth/verify) ⌘I --- # Check Clawback Eligibility - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Clawback Check Clawback Eligibility [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Check Clawback Eligibility cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/check_clawback_eligibility \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "sparkTransferId": "550e8400-e29b-41d4-a716-446655440000" }' 200 Claimed Copy Ask AI { "accepted": false, "error": "Transfer has invalid status for clawback"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / check\_clawback\_eligibility Try it Check Clawback Eligibility cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/check_clawback_eligibility \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "sparkTransferId": "550e8400-e29b-41d4-a716-446655440000" }' 200 Claimed Copy Ask AI { "accepted": false, "error": "Transfer has invalid status for clawback"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Transfer to evaluate for clawback eligibility Request body for clawing back stuck funds. Clawbacks allow users to recover funds that were sent but were not processed correctly. This is a safety mechanism to prevent permanent loss of funds due to system failures or edge cases. [​](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility#body-spark-transfer-id) sparkTransferId string required Spark transfer ID or transaction ID of the original payment. This is the transfer that needs to be clawed back. Example: `"550e8400-e29b-41d4-a716-446655440000"` #### Response 200 application/json Eligibility result Response for a CheckClawbackEligibility request [​](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility#response-accepted) accepted boolean required Whether the transfer is eligible for clawback Example: `true` [​](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility#response-error) error string | null Error message explaining why the transfer is not eligible (only present when accepted is false) Example: `"Transfer is too old for clawback"` Was this page helpful? YesNo [Verify\ \ Previous](https://docs.flashnet.xyz/api-reference/auth/verify) [Clawback Funds\ \ Next](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ⌘I --- # Verify - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/auth/verify#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Auth Verify [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Verify cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/auth/verify \ --header 'Content-Type: application/json' \ --data '{ "publicKey": "021eec911553028dded1ec644144cd3afee9d9bfe7846af3cf8e6d84f4b3102389", "signature": "304402203a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3" }' 200 example Copy Ask AI { "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIwMjFlZWM5MTE1NTMwMjhkZGVkMWVjNjQ0MTQ0Y2QzYWZlZTlkOWJmZTc4NDZhZjNjZjhlNmQ4NGY0YjMxMDIzODkiLCJleHAiOjE3MDUzNDUyMDB9.dGhlc2VhcmVub3RyZWFsdG9rZW5zYnV0anVzdGV4YW1wbGVz"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / auth / verify Try it Verify cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/auth/verify \ --header 'Content-Type: application/json' \ --data '{ "publicKey": "021eec911553028dded1ec644144cd3afee9d9bfe7846af3cf8e6d84f4b3102389", "signature": "304402203a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3" }' 200 example Copy Ask AI { "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIwMjFlZWM5MTE1NTMwMjhkZGVkMWVjNjQ0MTQ0Y2QzYWZlZTlkOWJmZTc4NDZhZjNjZjhlNmQ4NGY0YjMxMDIzODkiLCJleHAiOjE3MDUzNDUyMDB9.dGhlc2VhcmVub3RyZWFsdG9rZW5zYnV0anVzdGV4YW1wbGVz"} #### Body application/json The public key and signature to verify ownership Request body for verifying a signed authentication challenge. Contains the public key and signature proving ownership of the corresponding private key. The signature must be created by signing the challenge string received from the `/v1/auth/challenge` endpoint. [​](https://docs.flashnet.xyz/api-reference/auth/verify#body-public-key) publicKey string required The public key used to sign the challenge. Must match the public key used in the challenge request. Example: `"021eec911553028dded1ec644144cd3afee9d9bfe7846af3cf8e6d84f4b3102389"` [​](https://docs.flashnet.xyz/api-reference/auth/verify#body-signature) signature string required Signature of the challenge string, encoded as hex. Must be a valid ECDSA signature created with the private key corresponding to the public key. Example: `"304402203a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3"` #### Response 200 application/json Challenge verified successfully and JWT token issued Response containing the JWT access token for authenticated API calls. [​](https://docs.flashnet.xyz/api-reference/auth/verify#response-access-token) accessToken string required JWT access token for making authenticated API calls. This token should be included in the Authorization header as "Bearer ". The token has a limited lifetime and will need to be renewed. Example: `"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIwMjFlZWM5MTE1NTMwMjhkZGVkMWVjNjQ0MTQ0Y2QzYWZlZTlkOWJmZTc4NDZhZjNjZjhlNmQ4NGY0YjMxMDIzODkiLCJleHAiOjE3MDUzNDUyMDB9.dGhlc2VhcmVub3RyZWFsdG9rZW5zYnV0anVzdGV4YW1wbGVz"` Was this page helpful? YesNo [Challenge\ \ Previous](https://docs.flashnet.xyz/api-reference/auth/challenge) [Check Clawback Eligibility\ \ Next](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) ⌘I --- # Clawback Funds - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Clawback Clawback Funds [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Clawback Funds cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/clawback \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "lpIdentityPublicKey": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "nonce": "clawback-nonce-123456", "senderPublicKey": "02abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3", "sparkTransferId": "550e8400-e29b-41d4-a716-446655440000" }' 200 Success Copy Ask AI { "accepted": true, "internalRequestId": "settlement-internal-123", "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW", "sparkStatusTrackingId": "spark-track-456"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / clawback Try it Clawback Funds cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/clawback \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "lpIdentityPublicKey": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "nonce": "clawback-nonce-123456", "senderPublicKey": "02abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3", "sparkTransferId": "550e8400-e29b-41d4-a716-446655440000" }' 200 Success Copy Ask AI { "accepted": true, "internalRequestId": "settlement-internal-123", "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW", "sparkStatusTrackingId": "spark-track-456"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Clawback request details including transfer ID and authentication Request body for clawing back stuck funds. Clawbacks allow users to recover funds that were sent to an LP wallet but were not processed correctly. This is a safety mechanism to prevent permanent loss of funds due to system failures or edge cases. [​](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds#body-sender-public-key) senderPublicKey string required Public key of the original sender requesting the clawback. Must match the authenticated user's public key. Example: `"02abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"` [​](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds#body-spark-transfer-id) sparkTransferId string required Spark transfer ID or transaction ID of the original payment. This is the transfer that needs to be clawed back. Example: `"550e8400-e29b-41d4-a716-446655440000"` [​](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds#body-lp-identity-public-key) lpIdentityPublicKey string required Identity public key of the LP wallet where the funds were sent. This must be a valid LP wallet that exists in the system. Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds#body-nonce) nonce string required Unique nonce for replay protection. Each clawback request must use a unique nonce. Example: `"clawback-nonce-123456"` [​](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds#body-signature) signature string required Hex-encoded secp256k1 signature of the request. Must be signed by the private key corresponding to `sender_public_key`. Example: `"3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3"` #### Response 200 application/json Clawback accepted for processing Response for a successful clawback request [​](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds#response-request-id) requestId string required Unique request ID for tracking this clawback Example: `"01HJZKFABCDEFGHJKLMNPQRSTVW"` [​](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds#response-accepted) accepted boolean required Whether the clawback was accepted for processing Example: `true` [​](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds#response-internal-request-id) internalRequestId string required Internal request ID from the settlement service Example: `"settlement-internal-123"` [​](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds#response-spark-status-tracking-id) sparkStatusTrackingId string required Spark status tracking ID for monitoring the refund Example: `"spark-track-456"` [​](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds#response-error) error string | null Optional error message if the clawback was rejected Example: `"Transfer is too old for clawback"` Was this page helpful? YesNo [Check Clawback Eligibility\ \ Previous](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) [Get Host Fee Withdrawal History\ \ Next](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) ⌘I --- # Get Integrator Fees - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Hosts Get Integrator Fees [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get Integrator Fees cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/integrators/fees \ --header 'Authorization: Bearer ' 200 example Copy Ask AI { "integratorPublicKey": "03fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210", "pools": [ { "assetBFees": "500000", "assetBPubkey": "03fedcba321...", "hostNamespace": "my-cool-exchange", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899" } ], "totalAssetBFees": "500000"} GET https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / integrators / fees Try it Get Integrator Fees cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/integrators/fees \ --header 'Authorization: Bearer ' 200 example Copy Ask AI { "integratorPublicKey": "03fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210", "pools": [ { "assetBFees": "500000", "assetBPubkey": "03fedcba321...", "hostNamespace": "my-cool-exchange", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899" } ], "totalAssetBFees": "500000"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Response 200 application/json Integrator fees retrieved successfully Response containing all integrator fees across pools. [​](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees#response-integrator-public-key) integratorPublicKey string required Integrator public key. Example: `"03fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210"` [​](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees#response-pools) pools object\[\] required List of pools where the integrator has accumulated fees. Show child attributes [​](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees#response-total-asset-b-fees) totalAssetBFees integer | null Total fees across all pools for Asset B (if all pools use the same asset). This will be None if pools use different assets. Required range: `x >= 0` Was this page helpful? YesNo [Get Host\ \ Previous](https://docs.flashnet.xyz/api-reference/hosts/get-host) [Get Pool Integrator Fees\ \ Next](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ⌘I --- # Get Pool Host Fees - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Hosts Get Pool Host Fees [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get Pool Host Fees cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/hosts/pool-fees \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "hostNamespace": "my-cool-exchange", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899" }' 200 example Copy Ask AI { "assetBFees": "500000", "feeRecipientType": "host", "hostNamespace": "my-cool-exchange", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / hosts / pool-fees Try it Get Pool Host Fees cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/hosts/pool-fees \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "hostNamespace": "my-cool-exchange", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899" }' 200 example Copy Ask AI { "assetBFees": "500000", "feeRecipientType": "host", "hostNamespace": "my-cool-exchange", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Host namespace and pool ID to retrieve fees from Request payload for retrieving host fees from an AMM pool. [​](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees#body-host-namespace) hostNamespace string required Host namespace to retrieve fees for. The authenticated user must be either this host's fee recipient Example: `"my-cool-exchange"` [​](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees#body-pool-id) poolId string required LP public key of the pool to retrieve host fees from. This identifies which pool to query for accumulated fees. Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` #### Response 200 application/json Host fees retrieved successfully Response containing host fees for the authenticated entity. [​](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees#response-pool-id) poolId string required LP public key of the pool. Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees#response-host-namespace) hostNamespace string required Host namespace for which fees are shown. Example: `"my-cool-exchange"` [​](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees#response-fee-recipient-type) feeRecipientType string required The entity for which fees are displayed. Example: `"host"` [​](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees#response-asset-b-fees) assetBFees integer required Accumulated fees for Asset B in its smallest unit. Required range: `x >= 0` Example: `"500000"` Was this page helpful? YesNo [Get Host Fees\ \ Previous](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) [Register Host\ \ Next](https://docs.flashnet.xyz/api-reference/hosts/register-host) ⌘I --- # Get Host Fees - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Hosts Get Host Fees [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get Host Fees cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/hosts/fees \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "hostNamespace": "my-cool-exchange" }' 200 example Copy Ask AI { "feeRecipientType": "host", "hostNamespace": "my-cool-exchange", "pools": [ { "assetBFees": "500000", "assetBPubkey": "03fedcba321...", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899" } ], "totalAssetBFees": "500000"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / hosts / fees Try it Get Host Fees cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/hosts/fees \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "hostNamespace": "my-cool-exchange" }' 200 example Copy Ask AI { "feeRecipientType": "host", "hostNamespace": "my-cool-exchange", "pools": [ { "assetBFees": "500000", "assetBPubkey": "03fedcba321...", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899" } ], "totalAssetBFees": "500000"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Host namespace to retrieve fees for Request payload for retrieving all host fees. [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees#body-host-namespace) hostNamespace string required Host namespace to retrieve fees for. Example: `"my-cool-exchange"` #### Response 200 application/json Host fees retrieved successfully Response containing all host fees across pools. [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees#response-host-namespace) hostNamespace string required Host namespace. Example: `"my-cool-exchange"` [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees#response-fee-recipient-type) feeRecipientType string required The entity for which fees are displayed. Example: `"host"` [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees#response-pools) pools object\[\] required List of pools where the host has accumulated fees. Show child attributes [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees#response-total-asset-b-fees) totalAssetBFees integer | null Total fees across all pools for Asset B (if all pools use the same asset). This will be None if pools use different assets. Required range: `x >= 0` Was this page helpful? YesNo [Get Host Fee Withdrawal History\ \ Previous](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) [Get Pool Host Fees\ \ Next](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) ⌘I --- # Get Host - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/hosts/get-host#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Hosts Get Host [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get Host cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/hosts/{namespace} 200 404 500 Copy Ask AI { "createdAt": "2024-01-15T10:30:00Z", "feeRecipientPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567", "flashnetSplitPercentage": 0.6, "minFeeBps": 50, "namespace": "my-cool-exchange" } GET https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / hosts / {namespace} Try it Get Host cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/hosts/{namespace} 200 404 500 Copy Ask AI { "createdAt": "2024-01-15T10:30:00Z", "feeRecipientPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567", "flashnetSplitPercentage": 0.6, "minFeeBps": 50, "namespace": "my-cool-exchange" } #### Path Parameters [​](https://docs.flashnet.xyz/api-reference/hosts/get-host#parameter-namespace) namespace string required The unique namespace identifier of the host #### Response 200 application/json Host information retrieved successfully Response returned when querying host information. [​](https://docs.flashnet.xyz/api-reference/hosts/get-host#response-namespace) namespace string required The host's unique namespace identifier. Example: `"my-cool-exchange"` [​](https://docs.flashnet.xyz/api-reference/hosts/get-host#response-fee-recipient-public-key) feeRecipientPublicKey string required Public key that receives the host's share of trading fees. Example: `"03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"` [​](https://docs.flashnet.xyz/api-reference/hosts/get-host#response-min-fee-bps) minFeeBps integer required Minimum host fee in basis points. Flashnet receives a configurable percentage of any host fee charged. Example: `50` [​](https://docs.flashnet.xyz/api-reference/hosts/get-host#response-flashnet-split-percentage) flashnetSplitPercentage number required Percentage of host fees that goes to Flashnet (0.00-1.00). Example: `0.6` [​](https://docs.flashnet.xyz/api-reference/hosts/get-host#response-created-at) createdAt string required Date when the host was registered. Example: `"2024-01-15T10:30:00Z"` Was this page helpful? YesNo [Withdraw Host Fees\ \ Previous](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) [Get Integrator Fees\ \ Next](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) ⌘I --- # Register Host - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/hosts/register-host#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Hosts Register Host [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Register Host cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/hosts/register \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "feeRecipientPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567", "minFeeBps": 50, "namespace": "my-cool-exchange", "nonce": "550e8400-e29b-41d4-a716-446655440000", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3" }' 200 example Copy Ask AI { "message": "Host 'my-cool-exchange' registered successfully.", "namespace": "my-cool-exchange"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / hosts / register Try it Register Host cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/hosts/register \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "feeRecipientPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567", "minFeeBps": 50, "namespace": "my-cool-exchange", "nonce": "550e8400-e29b-41d4-a716-446655440000", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3" }' 200 example Copy Ask AI { "message": "Host 'my-cool-exchange' registered successfully.", "namespace": "my-cool-exchange"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/hosts/register-host#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Host registration details including namespace, minimum fee, and authentication Request body for registering a new host on the Flashnet AMM platform. Hosts are integrators who can create and manage AMM pools, earning fees from trades. Registration requires configuring a minimum fee that the host will accept. [​](https://docs.flashnet.xyz/api-reference/hosts/register-host#body-namespace) namespace string required Unique namespace identifier for the host. Must be between 3-32 characters and globally unique. Example: `"my-cool-exchange"` [​](https://docs.flashnet.xyz/api-reference/hosts/register-host#body-min-fee-bps) minFeeBps integer required Minimum host fee in basis points (BPS). This is the minimum fee that must be charged when using this host's namespace. Must be between 10-100 BPS (0.1% - 1%). Flashnet receives a configurable percentage of any host fee charged (default 60%). 1 BPS = 0.01%, so 100 BPS = 1%. Example: `50` [​](https://docs.flashnet.xyz/api-reference/hosts/register-host#body-fee-recipient-public-key) feeRecipientPublicKey string required Public key that will receive the host's share of trading fees. Must be a valid secp256k1 public key. Example: `"03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"` [​](https://docs.flashnet.xyz/api-reference/hosts/register-host#body-nonce) nonce string required Unique `nonce` for replay protection. Each request must use a unique `nonce`. Example: `"550e8400-e29b-41d4-a716-446655440000"` [​](https://docs.flashnet.xyz/api-reference/hosts/register-host#body-signature) signature string required Hex-encoded secp256k1 signature of the request. Must be signed by the private key corresponding to `fee_recipient_public_key`. Example: `"3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3"` #### Response 200 application/json Host registered successfully Response returned after successfully registering a host. [​](https://docs.flashnet.xyz/api-reference/hosts/register-host#response-namespace) namespace string required The registered namespace identifier. Example: `"my-cool-exchange"` [​](https://docs.flashnet.xyz/api-reference/hosts/register-host#response-message) message string required Human-readable confirmation message. Example: `"Host 'my-cool-exchange' registered successfully."` Was this page helpful? YesNo [Get Pool Host Fees\ \ Previous](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) [Withdraw Host Fees\ \ Next](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) ⌘I --- # Withdraw Host Fees - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Hosts Withdraw Host Fees [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Withdraw Host Fees cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/hosts/withdraw-fees \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "assetBAmount": 500000, "lpIdentityPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567", "nonce": "550e8400-e29b-41d4-a716-446655440000", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3" }' 200 example Copy Ask AI { "message": "Host fee withdrawal initiated successfully", "requestId": "550e8400-e29b-41d4-a716-446655440000", "status": "initiated"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / hosts / withdraw-fees Try it Withdraw Host Fees cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/hosts/withdraw-fees \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "assetBAmount": 500000, "lpIdentityPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567", "nonce": "550e8400-e29b-41d4-a716-446655440000", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3" }' 200 example Copy Ask AI { "message": "Host fee withdrawal initiated successfully", "requestId": "550e8400-e29b-41d4-a716-446655440000", "status": "initiated"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Fee withdrawal details including pool ID, amounts, and authentication Request payload for withdrawing host fees from an AMM pool. This struct defines the required parameters for a host to withdraw accumulated fees from an AMM pool. The request includes the pool ID, optional amounts to withdraw, and authentication/signature data. [​](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees#body-lp-identity-public-key) lpIdentityPublicKey string required Identity public key of the LP wallet (pool ID). This identifies which pool to withdraw fees from. Example: `"03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"` [​](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees#body-nonce) nonce string required Nonce used for signature replay-protection. Example: `"550e8400-e29b-41d4-a716-446655440000"` [​](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees#body-signature) signature string required ECDSA signature of the vectorized JSON payload including all the other fields in this request. Example: `"3045022100..."` [​](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees#body-asset-b-amount) assetBAmount integer | null Optional: Amount of asset B fees to withdraw in the smallest unit. If not specified, all available asset B fees will be withdrawn. Required range: `x >= 0` Example: `500000` #### Response 200 application/json Fee withdrawal initiated successfully Response for host fee withdrawal [​](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees#response-request-id) requestId string required Request ID for tracking Example: `"01HJZKFABCDEFGHJKLMNPQRSTVW"` [​](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees#response-accepted) accepted boolean required Whether withdrawal was initiated Example: `true` [​](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees#response-asset-b-withdrawn) assetBWithdrawn integer | null Asset B amount withdrawn Required range: `x >= 0` Example: `"500000"` [​](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees#response-transfer-id) transferId string | null Spark transfer ID for withdrawal [​](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees#response-error) error string | null Error message if rejected Was this page helpful? YesNo [Register Host\ \ Previous](https://docs.flashnet.xyz/api-reference/hosts/register-host) [Get Host\ \ Next](https://docs.flashnet.xyz/api-reference/hosts/get-host) ⌘I --- # Get Host Fee Withdrawal History - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Hosts Get Host Fee Withdrawal History [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get Host Fee Withdrawal History cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/hosts/fee-withdrawal-history \ --header 'Authorization: Bearer ' 200 400 401 500 Copy Ask AI { "page": 1, "pageSize": 20, "totalCount": 150, "totalWithdrawn": "25000000", "withdrawals": [\ {\ "amount": "500000",\ "assetPubkey": "BTC",\ "id": 12345,\ "lpPubkey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567",\ "poolAssetAAddress": "USD",\ "poolAssetBAddress": "BTC",\ "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW",\ "settlementRequestId": "550e8400-e29b-41d4-a716-446655440000",\ "timestamp": "2025-01-15T10:30:00Z",\ "transferId": "spark-transfer-uuid-123"\ }\ ] } GET https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / hosts / fee-withdrawal-history Try it Get Host Fee Withdrawal History cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/hosts/fee-withdrawal-history \ --header 'Authorization: Bearer ' 200 400 401 500 Copy Ask AI { "page": 1, "pageSize": 20, "totalCount": 150, "totalWithdrawn": "25000000", "withdrawals": [\ {\ "amount": "500000",\ "assetPubkey": "BTC",\ "id": 12345,\ "lpPubkey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567",\ "poolAssetAAddress": "USD",\ "poolAssetBAddress": "BTC",\ "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW",\ "settlementRequestId": "550e8400-e29b-41d4-a716-446655440000",\ "timestamp": "2025-01-15T10:30:00Z",\ "transferId": "spark-transfer-uuid-123"\ }\ ] } #### Authorizations [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Query Parameters [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#parameter-page) page integer Page number (1-indexed) Required range: `x >= 1` [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#parameter-page-size) pageSize integer Number of items per page (max 100) Required range: `1 <= x <= 100` [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#parameter-lp-pubkey) lpPubkey string | null Optional: Filter by specific pool LP public key [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#parameter-asset-b) assetB string | null Optional: Filter by specific asset B public key [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#parameter-from-date) fromDate any Optional: Start date for filtering (ISO 8601) [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#parameter-to-date) toDate any Optional: End date for filtering (ISO 8601) [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#parameter-sort-order) sortOrder string Sort order: "desc" (newest first) or "asc" (oldest first) #### Response 200 application/json Fee withdrawal history retrieved successfully Response for querying fee withdrawal history [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#response-withdrawals) withdrawals object\[\] required List of withdrawal records Show child attributes [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#response-total-count) totalCount integer required Total count of withdrawals (for pagination) Example: `150` [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#response-page) page integer required Current page number (1-indexed) Example: `1` [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#response-page-size) pageSize integer required Number of items per page Example: `20` [​](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history#response-total-withdrawn) totalWithdrawn integer | null Total amount withdrawn across all records (in the filter, not just this page) Required range: `x >= 0` Was this page helpful? YesNo [Clawback Funds\ \ Previous](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) [Get Host Fees\ \ Next](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) ⌘I --- # Get Pool Integrator Fees - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Hosts Get Pool Integrator Fees [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get Pool Integrator Fees cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/integrators/pool-fees \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899" }' 200 example Copy Ask AI { "assetBFees": "500000", "integratorPublicKey": "03fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / integrators / pool-fees Try it Get Pool Integrator Fees cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/integrators/pool-fees \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899" }' 200 example Copy Ask AI { "assetBFees": "500000", "integratorPublicKey": "03fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Pool ID to retrieve integrator fees from Request payload for retrieving integrator fees from an AMM pool. [​](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees#body-pool-id) poolId string required LP public key of the pool to retrieve integrator fees from. This identifies which pool to query for accumulated fees. Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` #### Response 200 application/json Integrator fees retrieved successfully Response containing integrator fees for the authenticated entity. [​](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees#response-pool-id) poolId string required LP public key of the pool. Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees#response-integrator-public-key) integratorPublicKey string required Integrator public key for which fees are shown. Example: `"03fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210"` [​](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees#response-asset-b-fees) assetBFees integer required Accumulated fees for Asset B in its smallest unit. Required range: `x >= 0` Example: `"500000"` Was this page helpful? YesNo [Get Integrator Fees\ \ Previous](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) [Get Integrator Fee Withdrawal History\ \ Next](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) ⌘I --- # Get Liquidity Positions - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Liquidity Get Liquidity Positions [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get Liquidity Positions cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/liquidity/positions \ --header 'Authorization: Bearer ' 200 example Copy Ask AI { "lpPublicKey": "03fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210", "positions": [ { "assetAAddress": "03abcdef123...", "assetAAmount": "500000", "assetBAddress": "03fedcba321...", "assetBAmount": "250000", "lpFeeRateBps": 100, "lpTokenSupply": "1000000000000", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "userLpTokens": "100000000", "userShareOfPoolPercent": 10 } ]} GET https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / liquidity / positions Try it Get Liquidity Positions cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/liquidity/positions \ --header 'Authorization: Bearer ' 200 example Copy Ask AI { "lpPublicKey": "03fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210", "positions": [ { "assetAAddress": "03abcdef123...", "assetAAmount": "500000", "assetBAddress": "03fedcba321...", "assetBAmount": "250000", "lpFeeRateBps": 100, "lpTokenSupply": "1000000000000", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "userLpTokens": "100000000", "userShareOfPoolPercent": 10 } ]} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Response 200 application/json Successfully retrieved LP positions Response containing all of a user's liquidity positions. [​](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions#response-lp-public-key) lpPublicKey string required The public key of the liquidity provider. Example: `"03fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210"` [​](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions#response-positions) positions object\[\] required A list of the user's liquidity positions. Show child attributes Was this page helpful? YesNo [Simulate Add Liquidity\ \ Previous](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) [Remove Liquidity\ \ Next](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) ⌘I --- # Settlement Health Check (uses grpc.health.v1 Health/Check) - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Status Settlement Health Check (uses grpc.health.v1 Health/Check) [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Settlement Health Check (uses grpc.health.v1 Health/Check) cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/ping 200 500 Copy Ask AI { "gatewayTimestamp": 1700000000, "requestId": "01H8Z0HMVXJN6A8Q9GR1J6Z34E", "settlementTimestamp": 1700000000, "status": "ok" } GET https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / ping Try it Settlement Health Check (uses grpc.health.v1 Health/Check) cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/ping 200 500 Copy Ask AI { "gatewayTimestamp": 1700000000, "requestId": "01H8Z0HMVXJN6A8Q9GR1J6Z34E", "settlementTimestamp": 1700000000, "status": "ok" } #### Response 200 application/json Settlement service is healthy (SERVING) Response to a settlement service health check request [​](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck#response-request-id) requestId string required Request ID Example: `"01HJZK7P9XYZ123ABCDEFGHJKL"` [​](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck#response-status) status string required Health status of the settlement service ('ok' if grpc.health.v1 reports SERVING) Example: `"ok"` [​](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck#response-settlement-timestamp) settlementTimestamp string required Timestamp from the settlement service in seconds Example: `1700000000` [​](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck#response-gateway-timestamp) gatewayTimestamp string required Timestamp of this gateway response in milliseconds Example: `1700000000` Was this page helpful? YesNo [Simulate Remove Liquidity\ \ Previous](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) [List Pools\ \ Next](https://docs.flashnet.xyz/api-reference/pools/list-pools) ⌘I --- # Simulate Add Liquidity - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Liquidity Simulate Add Liquidity [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Simulate Add Liquidity cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/liquidity/add/simulate \ --header 'Content-Type: application/json' \ --data '{ "assetAAmount": "100000000", "assetBAmount": "50000", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899" }' 200 example Copy Ask AI { "assetAAmountToAdd": "100000000", "assetARefundAmount": "0", "assetBAmountToAdd": "50000", "assetBRefundAmount": "0", "lpTokensToMint": "7071067", "poolSharePercentage": "25.5", "warningMessage": null} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / liquidity / add / simulate Try it Simulate Add Liquidity cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/liquidity/add/simulate \ --header 'Content-Type: application/json' \ --data '{ "assetAAmount": "100000000", "assetBAmount": "50000", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899" }' 200 example Copy Ask AI { "assetAAmountToAdd": "100000000", "assetARefundAmount": "0", "assetBAmountToAdd": "50000", "assetBRefundAmount": "0", "lpTokensToMint": "7071067", "poolSharePercentage": "25.5", "warningMessage": null} #### Body application/json Liquidity addition simulation parameters Request body for simulating liquidity addition without executing it. Simulation allows users to preview the results including actual amounts that would be added, LP tokens that would be minted, and any refunds due to ratio mismatch. [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity#body-pool-id) poolId string required LP public key of the pool to simulate adding liquidity to. The pool must exist and be active. Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity#body-asset-a-amount) assetAAmount integer required Amount of Asset A to simulate adding, in its smallest unit. Must be positive. For constant product pools, actual amount used may be less to maintain the correct ratio. Required range: `x >= 0` Example: `100000000` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity#body-asset-b-amount) assetBAmount integer required Amount of Asset B to simulate adding, in its smallest unit. Must be positive for constant product pools, should be 0 for single-sided pools. Required range: `x >= 0` Example: `50000` #### Response 200 application/json Simulation completed successfully Response from liquidity addition simulation with expected outcomes. [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity#response-lp-tokens-to-mint) lpTokensToMint string required Amount of LP tokens that would be minted. This represents your share of the pool. Example: `"7071067"` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity#response-asset-a-amount-to-add) assetAAmountToAdd integer required Actual amount of Asset A that would be added to the pool. May be less than requested if ratio adjustment is needed. Required range: `x >= 0` Example: `100000000` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity#response-asset-b-amount-to-add) assetBAmountToAdd integer required Actual amount of Asset B that would be added to the pool. May be less than requested if ratio adjustment is needed. Required range: `x >= 0` Example: `50000` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity#response-asset-a-refund-amount) assetARefundAmount integer required Amount of Asset A that would be refunded due to ratio mismatch. Zero if the provided ratio matches the pool ratio. Required range: `x >= 0` Example: `0` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity#response-asset-b-refund-amount) assetBRefundAmount integer required Amount of Asset B that would be refunded due to ratio mismatch. Zero if the provided ratio matches the pool ratio. Required range: `x >= 0` Example: `0` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity#response-pool-share-percentage) poolSharePercentage string required Your estimated share of the pool after adding liquidity, as a percentage. Example: `"25.5"` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity#response-warning-message) warningMessage string | null Warning message if the simulation detects potential issues. Common warnings include single-sided pool requirements or significant ratio mismatch. Example: `"Impossible to add liquidity to a single-sided pool"` Was this page helpful? YesNo [Add liquidity\ \ Previous](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) [Get Liquidity Positions\ \ Next](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) ⌘I --- # Remove Liquidity - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Liquidity Remove Liquidity [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Remove Liquidity cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/liquidity/remove \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "lpTokensToRemove": "100000", "nonce": "remove-liquidity-1702934567890", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "signature": "3045022100def...", "userPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" }' 200 Rejection Copy Ask AI { "error": "Insufficient LP token balance", "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / liquidity / remove Try it Remove Liquidity cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/liquidity/remove \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "lpTokensToRemove": "100000", "nonce": "remove-liquidity-1702934567890", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "signature": "3045022100def...", "userPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" }' 200 Rejection Copy Ask AI { "error": "Insufficient LP token balance", "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Liquidity removal details including LP tokens and authentication Request body for removing liquidity from a pool. When removing liquidity, you burn LP tokens to receive back a proportional share of both assets from the pool. The exact amounts depend on the current pool reserves and your share of the total LP tokens. [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#body-user-public-key) userPublicKey string required Hex-encoded secp256k1 public key of the liquidity provider. This must match the public key in your authentication token. Example: `"03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"` [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#body-pool-id) poolId string required Unique identifier of the pool to remove liquidity from. This is the pool's identity public key. Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#body-lp-tokens-to-remove) lpTokensToRemove string required Amount of LP tokens to burn, in their smallest unit. You will receive a proportional share of the pool's assets. Example: `"100000.00000000"` [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#body-nonce) nonce string required Unique `nonce` to prevent replay attacks. Each `nonce` can only be used once per user. Example: `"remove-liquidity-nonce-789"` [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#body-signature) signature string required Hex-encoded secp256k1 signature of the request. Must be signed by the private key corresponding to userPublicKey. Example: `"3045022100def..."` #### Response 200 application/json Liquidity removal process completed Response for removing liquidity from a pool [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#response-request-id) requestId string required User-friendly request ID for tracking Example: `"01HJZKFABCDEFGHJKLMNPQRSTVW"` [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#response-accepted) accepted boolean required Whether liquidity removal was accepted Example: `true` [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#response-asset-a-withdrawn) assetAWithdrawn integer | null Amount of asset A withdrawn (populated if accepted) Required range: `x >= 0` Example: `"50000000"` [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#response-asset-b-withdrawn) assetBWithdrawn integer | null Amount of asset B withdrawn (populated if accepted) Required range: `x >= 0` Example: `"25000"` [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#response-asset-a-transfer-id) assetATransferId string | null Spark transfer ID for asset A withdrawal (populated if accepted) Example: `"spark-transfer-a-789"` [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#response-asset-b-transfer-id) assetBTransferId string | null Spark transfer ID for asset B withdrawal (populated if accepted) Example: `"spark-transfer-b-012"` [​](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity#response-error) error string | null User-friendly error message (populated if rejected) Was this page helpful? YesNo [Get Liquidity Positions\ \ Previous](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) [Simulate Remove Liquidity\ \ Next](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ⌘I --- # Withdraw Integrator Fees - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Integrators Withdraw Integrator Fees [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Withdraw Integrator Fees cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/integrators/withdraw-fees \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "assetBAmount": 500000, "lpIdentityPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567", "nonce": "550e8400-e29b-41d4-a716-446655440000", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3" }' 200 example Copy Ask AI { "accepted": true, "assetBWithdrawn": 500000, "requestId": "550e8400-e29b-41d4-a716-446655441111", "transferId": "spark-transfer-asset-b-uuid"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / integrators / withdraw-fees Try it Withdraw Integrator Fees cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/integrators/withdraw-fees \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "assetBAmount": 500000, "lpIdentityPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567", "nonce": "550e8400-e29b-41d4-a716-446655440000", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3" }' 200 example Copy Ask AI { "accepted": true, "assetBWithdrawn": 500000, "requestId": "550e8400-e29b-41d4-a716-446655441111", "transferId": "spark-transfer-asset-b-uuid"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Integrator fee withdrawal request details including pool ID, optional amounts, and authentication. Request payload for withdrawing integrator fees from an AMM pool. [​](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees#body-lp-identity-public-key) lpIdentityPublicKey string required Identity public key of the LP wallet (pool ID). Example: `"03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"` [​](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees#body-nonce) nonce string required Nonce used for signature replay-protection. Example: `"550e8400-e29b-41d4-a716-446655440000"` [​](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees#body-signature) signature string required ECDSA signature of the vectorized JSON payload including all the other fields in this request. Example: `"3045022100..."` [​](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees#body-asset-b-amount) assetBAmount integer | null Optional: Amount of asset B fees to withdraw in the smallest unit. Required range: `x >= 0` Example: `500000` #### Response 200 application/json Integrator fee withdrawal initiated successfully Response for host fee withdrawal [​](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees#response-request-id) requestId string required Request ID for tracking Example: `"01HJZKFABCDEFGHJKLMNPQRSTVW"` [​](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees#response-accepted) accepted boolean required Whether withdrawal was initiated Example: `true` [​](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees#response-asset-b-withdrawn) assetBWithdrawn integer | null Asset B amount withdrawn Required range: `x >= 0` Example: `"500000"` [​](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees#response-transfer-id) transferId string | null Spark transfer ID for withdrawal [​](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees#response-error) error string | null Error message if rejected Was this page helpful? YesNo [Get Integrator Fee Withdrawal History\ \ Previous](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) [Add liquidity\ \ Next](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) ⌘I --- # Create CP Pool - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Pools Create CP Pool [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Create CP Pool cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/pools/constant-product \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "assetAAddress": "0338d6978bd3163d1547f9ddb8b215d1c163bc7b4a552e559b89057f5449ba69de", "assetBAddress": "020202020202020202020202020202020202020202020202020202020202020202", "hostNamespace": "my-cool-exchange", "lpFeeRateBps": "300", "nonce": "550e8400-e29b-41d4-a716-446655440000", "poolOwnerPublicKey": "03b06b7c3e39bf922be19b7ad5f19554bb7991cae585ed2e3374d51213ff4eeb3c", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3", "totalHostFeeRateBps": "200" }' 202 example Copy Ask AI { "message": "Pool created successfully. Initial liquidity can now be added to the pool.", "poolId": "03poollpidentitypubkeyfedcba9876543210fedcba9876543210fedcba9876"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / pools / constant-product Try it Create CP Pool cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/pools/constant-product \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "assetAAddress": "0338d6978bd3163d1547f9ddb8b215d1c163bc7b4a552e559b89057f5449ba69de", "assetBAddress": "020202020202020202020202020202020202020202020202020202020202020202", "hostNamespace": "my-cool-exchange", "lpFeeRateBps": "300", "nonce": "550e8400-e29b-41d4-a716-446655440000", "poolOwnerPublicKey": "03b06b7c3e39bf922be19b7ad5f19554bb7991cae585ed2e3374d51213ff4eeb3c", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3", "totalHostFeeRateBps": "200" }' 202 example Copy Ask AI { "message": "Pool created successfully. Initial liquidity can now be added to the pool.", "poolId": "03poollpidentitypubkeyfedcba9876543210fedcba9876543210fedcba9876"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Constant product pool creation parameters including fee configuration Request body for creating a new constant product AMM pool. This struct contains all the parameters required to initialize a new constant product pool. Unlike single-sided pools, constant product pools don't require initial deposits as they will be initialized on the first liquidity addition. [​](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool#body-pool-owner-public-key) poolOwnerPublicKey string required Public key of the pool owner. Example: `"03b06b7c3e39bf922be19b7ad5f19554bb7991cae585ed2e3374d51213ff4eeb3c"` [​](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool#body-asset-a-address) assetAAddress string required Address of asset A. Example: `"0338d6978bd3163d1547f9ddb8b215d1c163bc7b4a552e559b89057f5449ba69de"` [​](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool#body-asset-b-address) assetBAddress string required Address of asset B. Example: `"020202020202020202020202020202020202020202020202020202020202020202"` [​](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool#body-lp-fee-rate-bps) lpFeeRateBps integer required Liquidity provider fee rate, in basis points (BIPS). Required range: `x >= 0` Example: `300` [​](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool#body-total-host-fee-rate-bps) totalHostFeeRateBps integer required Total host fee rate in basis points (BPS). Includes both host and Flashnet fees. Must be validated based on host configuration. Required range: `x >= 0` Example: `200` [​](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool#body-nonce) nonce string required Unique `nonce` for replay protection. Example: `"550e8400-e29b-41d4-a716-446655440000"` [​](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool#body-signature) signature string required Hex-encoded signature of the `nonce`, signed by the pool owner. Example: `"3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3"` [​](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool#body-host-namespace) hostNamespace string | null Optional host namespace for fee sharing. If provided, fees will be shared with the specified host. Example: `"my-cool-exchange"` #### Response 202 application/json Pool creation process initiated. Poll status endpoint for updates. Response for pool creation [​](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool#response-pool-id) poolId string required Pool ID (LP public key) Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool#response-message) message string required Human-readable confirmation message Example: `"Pool created successfully"` Was this page helpful? YesNo [List Pools\ \ Previous](https://docs.flashnet.xyz/api-reference/pools/list-pools) [Create Bonding Pool\ \ Next](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) ⌘I --- # Simulate Remove Liquidity - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Liquidity Simulate Remove Liquidity [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Simulate Remove Liquidity cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/liquidity/remove/simulate \ --header 'Content-Type: application/json' \ --data '{ "lpTokensToRemove": "100000.00000000", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "providerPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" }' 200 example Copy Ask AI { "assetAAmount": "50000000", "assetBAmount": "25000", "currentLpBalance": "200000", "poolShareRemovedPercentage": "50.0", "warningMessage": null} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / liquidity / remove / simulate Try it Simulate Remove Liquidity cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/liquidity/remove/simulate \ --header 'Content-Type: application/json' \ --data '{ "lpTokensToRemove": "100000.00000000", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "providerPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" }' 200 example Copy Ask AI { "assetAAmount": "50000000", "assetBAmount": "25000", "currentLpBalance": "200000", "poolShareRemovedPercentage": "50.0", "warningMessage": null} #### Body application/json Liquidity removal simulation parameters Request body for simulating liquidity removal without executing it. Simulation allows users to preview how much of each asset they would receive when burning their LP tokens. [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity#body-pool-id) poolId string required LP public key of the pool to simulate removing liquidity from. The pool must exist and have liquidity. Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity#body-provider-public-key) providerPublicKey string required Public key of the liquidity provider. Used to check current LP token balance. Example: `"03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity#body-lp-tokens-to-remove) lpTokensToRemove string required Amount of LP tokens to simulate burning, in decimal string format (smallest unit). Must be positive and not exceed the provider's balance. Example: `"100000.00000000"` #### Response 200 application/json Simulation completed successfully Response from liquidity removal simulation with expected outcomes. [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity#response-asset-a-amount) assetAAmount integer required Amount of Asset A that would be returned. Proportional to your share of the pool. Required range: `x >= 0` Example: `"50000000"` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity#response-asset-b-amount) assetBAmount integer required Amount of Asset B that would be returned. Proportional to your share of the pool. Required range: `x >= 0` Example: `"25000"` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity#response-current-lp-balance) currentLpBalance string required Current LP token balance of the provider. Shows how many tokens they have available to remove. Example: `"200000"` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity#response-pool-share-removed-percentage) poolShareRemovedPercentage string required Percentage of the pool being removed. Example: `"50.0"` [​](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity#response-warning-message) warningMessage string | null Warning message if the simulation detects potential issues. Common warnings include removing all liquidity or insufficient balance. Example: `"Removing more than 10% of pool liquidity may impact price"` Was this page helpful? YesNo [Remove Liquidity\ \ Previous](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) [Settlement Health Check (uses grpc.health.v1 Health/Check)\ \ Next](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ⌘I --- # Get Integrator Fee Withdrawal History - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Integrators Get Integrator Fee Withdrawal History [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get Integrator Fee Withdrawal History cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/integrators/fee-withdrawal-history \ --header 'Authorization: Bearer ' 200 400 401 500 Copy Ask AI { "page": 1, "pageSize": 20, "totalCount": 75, "totalWithdrawn": "12500000", "withdrawals": [\ {\ "amount": "250000",\ "assetPubkey": "BTC",\ "id": 12346,\ "lpPubkey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567",\ "poolAssetAAddress": "USD",\ "poolAssetBAddress": "BTC",\ "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVX",\ "settlementRequestId": "660e8400-e29b-41d4-a716-446655440000",\ "timestamp": "2025-01-16T14:20:00Z",\ "transferId": "spark-transfer-uuid-456"\ }\ ] } GET https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / integrators / fee-withdrawal-history Try it Get Integrator Fee Withdrawal History cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/integrators/fee-withdrawal-history \ --header 'Authorization: Bearer ' 200 400 401 500 Copy Ask AI { "page": 1, "pageSize": 20, "totalCount": 75, "totalWithdrawn": "12500000", "withdrawals": [\ {\ "amount": "250000",\ "assetPubkey": "BTC",\ "id": 12346,\ "lpPubkey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567",\ "poolAssetAAddress": "USD",\ "poolAssetBAddress": "BTC",\ "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVX",\ "settlementRequestId": "660e8400-e29b-41d4-a716-446655440000",\ "timestamp": "2025-01-16T14:20:00Z",\ "transferId": "spark-transfer-uuid-456"\ }\ ] } #### Authorizations [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Query Parameters [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#parameter-page) page integer Page number (1-indexed) Required range: `x >= 1` [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#parameter-page-size) pageSize integer Number of items per page (max 100) Required range: `1 <= x <= 100` [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#parameter-lp-pubkey) lpPubkey string | null Optional: Filter by specific pool LP public key [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#parameter-asset-b) assetB string | null Optional: Filter by specific asset B public key [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#parameter-from-date) fromDate any Optional: Start date for filtering (ISO 8601) [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#parameter-to-date) toDate any Optional: End date for filtering (ISO 8601) [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#parameter-sort-order) sortOrder string Sort order: "desc" (newest first) or "asc" (oldest first) #### Response 200 application/json Fee withdrawal history retrieved successfully Response for querying fee withdrawal history [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#response-withdrawals) withdrawals object\[\] required List of withdrawal records Show child attributes [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#response-total-count) totalCount integer required Total count of withdrawals (for pagination) Example: `150` [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#response-page) page integer required Current page number (1-indexed) Example: `1` [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#response-page-size) pageSize integer required Number of items per page Example: `20` [​](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history#response-total-withdrawn) totalWithdrawn integer | null Total amount withdrawn across all records (in the filter, not just this page) Required range: `x >= 0` Was this page helpful? YesNo [Get Pool Integrator Fees\ \ Previous](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) [Withdraw Integrator Fees\ \ Next](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ⌘I --- # Confirm Initial Deposit - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Pools Confirm Initial Deposit [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Confirm Initial Deposit cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/pools/single-sided/confirm-initial-deposit \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "assetASparkTransferId": "spark-transfer-uuid-or-hash-for-asset-a", "nonce": "confirm-deposit-nonce-789", "poolId": "03poollpidentitypubkeyfedcba9876543210fedcba9876543210fedcba9876", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3" }' 202 example Copy Ask AI { "confirmed": true, "message": "Initial deposit confirmed and pool activated", "poolId": "03poollpidentitypubkeyfedcba9876543210fedcba9876543210fedcba9876"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / pools / single-sided / confirm-initial-deposit Try it Confirm Initial Deposit cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/pools/single-sided/confirm-initial-deposit \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "assetASparkTransferId": "spark-transfer-uuid-or-hash-for-asset-a", "nonce": "confirm-deposit-nonce-789", "poolId": "03poollpidentitypubkeyfedcba9876543210fedcba9876543210fedcba9876", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3" }' 202 example Copy Ask AI { "confirmed": true, "message": "Initial deposit confirmed and pool activated", "poolId": "03poollpidentitypubkeyfedcba9876543210fedcba9876543210fedcba9876"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Deposit confirmation details including transfer proof and authentication Request to confirm the initial deposit for an AMM pool. [​](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit#body-pool-id) poolId string required The unique identifier of the pool (LP identity public key). Example: `"03poollpidentitypubkeyfedcba9876543210fedcba9876543210fedcba9876"` [​](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit#body-asset-a-spark-transfer-id) assetASparkTransferId string required Spark network transfer ID proving the deposit of Asset A to the pool's wallet. Example: `"spark-transfer-uuid-or-hash-for-asset-a"` [​](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit#body-nonce) nonce string required Nonce for replay protection. Example: `"confirm-deposit-nonce-789"` [​](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit#body-signature) signature string required Signature of the `nonce` (hex encoded). Example: `"3045022100def001122..."` [​](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit#body-pool-owner-public-key) poolOwnerPublicKey string | null Optional: Pool owner public key (if not provided, will be extracted from auth token). Example: `"03b06b7c3e39bf922be19b7ad5f19554bb7991cae585ed2e3374d51213ff4eeb3c"` #### Response 202 application/json Deposit confirmation initiated. Pool will be activated upon successful processing. Response for confirming initial pool deposit [​](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit#response-pool-id) poolId string required Pool ID Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit#response-confirmed) confirmed boolean required Whether the deposit was confirmed Example: `true` [​](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit#response-message) message string required Human-readable message Example: `"Initial deposit confirmed and pool activated"` Was this page helpful? YesNo [Create Bonding Pool\ \ Previous](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) [Get Pool\ \ Next](https://docs.flashnet.xyz/api-reference/pools/get-pool) ⌘I --- # Add liquidity - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Liquidity Add liquidity [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Add liquidity cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/liquidity/add \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "assetAAmountToAdd": "100000000", "assetAMinAmountIn": "95000000", "assetASparkTransferId": "550e8400-e29b-41d4-a716-446655440000", "assetBAmountToAdd": "50000", "assetBMinAmountIn": "45000", "assetBSparkTransferId": "650f9500-f39c-51e5-b827-557766550001", "nonce": "add-liquidity-1702934567890", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "signature": "3045022100abc...", "userPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" }' 200 Rejection Copy Ask AI { "accepted": false, "error": "Pool is not accepting liquidity", "refund": { "assetAAmount": "100000000", "assetATransferId": "850h9700-h50e-73g7-d049-779988770003", "assetBAmount": "50000", "assetBTransferId": "950i0800-i61f-84h8-e150-880099880004" }, "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / liquidity / add Try it Add liquidity cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/liquidity/add \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "assetAAmountToAdd": "100000000", "assetAMinAmountIn": "95000000", "assetASparkTransferId": "550e8400-e29b-41d4-a716-446655440000", "assetBAmountToAdd": "50000", "assetBMinAmountIn": "45000", "assetBSparkTransferId": "650f9500-f39c-51e5-b827-557766550001", "nonce": "add-liquidity-1702934567890", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "signature": "3045022100abc...", "userPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" }' 200 Rejection Copy Ask AI { "accepted": false, "error": "Pool is not accepting liquidity", "refund": { "assetAAmount": "100000000", "assetATransferId": "850h9700-h50e-73g7-d049-779988770003", "assetBAmount": "50000", "assetBTransferId": "950i0800-i61f-84h8-e150-880099880004" }, "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Liquidity addition details including assets, amounts, and authentication Request body for adding liquidity to a pool. When adding liquidity to a pool, you must provide both assets in the correct ratio for constant product pools, or can provide single-sided liquidity for single-sided pools. The system will automatically calculate the optimal amounts and refund any excess. [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#body-user-public-key) userPublicKey string required Hex-encoded secp256k1 public key of the liquidity provider. This must match the public key in your authentication token. Example: `"03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#body-pool-id) poolId string required Unique identifier of the pool to add liquidity to. This is the pool's identity public key. Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#body-asset-a-spark-transfer-id) assetASparkTransferId string required Spark network transfer ID for the Asset A deposit. This transfer must not have been used before and will be reserved during validation. Example: `"550e8400-e29b-41d4-a716-446655440000"` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#body-asset-b-spark-transfer-id) assetBSparkTransferId string required Spark network transfer ID for the Asset B deposit. Required for constant product pools, can be empty for single-sided pools. Example: `"650f9500-f39c-51e5-b827-557766550001"` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#body-asset-a-amount-to-add) assetAAmountToAdd integer required Amount of Asset A to add, in its smallest unit (e.g., satoshis for Bitcoin). The actual amount used may be less if the ratio needs adjustment. Required range: `x >= 0` Example: `100000000` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#body-asset-b-amount-to-add) assetBAmountToAdd integer required Amount of Asset B to add, in its smallest unit. For single-sided pools, this should be 0. Required range: `x >= 0` Example: `50000` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#body-asset-a-min-amount-in) assetAMinAmountIn integer required Minimum amount of Asset A to receive, in its smallest unit. If the pool doesn't have enough liquidity to meet this, the request will be rejected. Required range: `x >= 0` Example: `95000000` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#body-asset-b-min-amount-in) assetBMinAmountIn integer required Minimum amount of Asset B to receive, in its smallest unit. If the pool doesn't have enough liquidity to meet this, the request will be rejected. Required range: `x >= 0` Example: `45000` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#body-nonce) nonce string required Unique `nonce` to prevent replay attacks. Each `nonce` can only be used once per user. Example: `"add-liquidity-nonce-456"` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#body-signature) signature string required Hex-encoded secp256k1 signature of the request. Must be signed by the private key corresponding to userPublicKey. Example: `"3045022100abc..."` #### Response 200 application/json Liquidity addition executed successfully Response for adding liquidity to a pool [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#response-request-id) requestId string required User-friendly request ID for tracking Example: `"01HJZKFABCDEFGHJKLMNPQRSTVW"` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#response-accepted) accepted boolean required Whether liquidity addition was accepted Example: `true` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#response-lp-tokens-minted) lpTokensMinted string | null LP tokens minted (populated if accepted) Example: `"12340000.00000000"` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#response-asset-a-amount-used) assetAAmountUsed integer | null Actual asset A amount used (populated if accepted) Required range: `x >= 0` Example: `"100000000"` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#response-asset-b-amount-used) assetBAmountUsed integer | null Actual asset B amount used (populated if accepted) Required range: `x >= 0` Example: `"50000"` [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#response-error) error string | null User-friendly error message (populated if rejected) [​](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity#response-refund) refund object Details about refunded assets Show child attributes Was this page helpful? YesNo [Withdraw Integrator Fees\ \ Previous](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) [Simulate Add Liquidity\ \ Next](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) ⌘I --- # List Pools - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/pools/list-pools#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Pools List Pools [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close List Pools cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/pools 200 500 Copy Ask AI { "pools": [\ {\ "assetAAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",\ "assetAReserve": "1041999990",\ "assetBAddress": "020202020202020202020202020202020202020202020202020202020202020202",\ "assetBReserve": "496",\ "bondingProgressPercent": "15.5",\ "createdAt": "2025-01-15T10:09:58.09646Z",\ "currentPriceAInB": "0.00000004761904807256236",\ "curveType": "SINGLE_SIDED",\ "hostFeeBps": 100,\ "hostName": "my-cool-exchange",\ "initialReserveA": "1000000000",\ "lpFeeBps": 30,\ "lpPublicKey": "0315299b3f9f4e2beb8576ea2bf72ea1bc741eb255bfc3f6387de4d47b5c05972d",\ "priceChangePercent24h": "-5.25",\ "thresholdPct": 80,\ "tvlAssetB": "992",\ "updatedAt": "2025-01-15T12:30:45.12345Z",\ "virtualReserveA": "1073741824",\ "virtualReserveB": "1073741824",\ "volume24hAssetB": "500"\ }\ ], "totalCount": 42 } GET https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / pools Try it List Pools cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/pools 200 500 Copy Ask AI { "pools": [\ {\ "assetAAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",\ "assetAReserve": "1041999990",\ "assetBAddress": "020202020202020202020202020202020202020202020202020202020202020202",\ "assetBReserve": "496",\ "bondingProgressPercent": "15.5",\ "createdAt": "2025-01-15T10:09:58.09646Z",\ "currentPriceAInB": "0.00000004761904807256236",\ "curveType": "SINGLE_SIDED",\ "hostFeeBps": 100,\ "hostName": "my-cool-exchange",\ "initialReserveA": "1000000000",\ "lpFeeBps": 30,\ "lpPublicKey": "0315299b3f9f4e2beb8576ea2bf72ea1bc741eb255bfc3f6387de4d47b5c05972d",\ "priceChangePercent24h": "-5.25",\ "thresholdPct": 80,\ "tvlAssetB": "992",\ "updatedAt": "2025-01-15T12:30:45.12345Z",\ "virtualReserveA": "1073741824",\ "virtualReserveB": "1073741824",\ "volume24hAssetB": "500"\ }\ ], "totalCount": 42 } #### Query Parameters [​](https://docs.flashnet.xyz/api-reference/pools/list-pools#parameter-asset-a-address) assetAAddress string | null Asset A address. Defaults to all assets. [​](https://docs.flashnet.xyz/api-reference/pools/list-pools#parameter-asset-b-address) assetBAddress string | null Asset B address. Defaults to all assets. [​](https://docs.flashnet.xyz/api-reference/pools/list-pools#parameter-host-names) hostNames string\[\] Host names to filter by. Can be passed as repeated parameters (e.g., hostNames=host1&hostNames=host2) or comma-separated (e.g., hostNames=host1,host2). Defaults to all hosts. [​](https://docs.flashnet.xyz/api-reference/pools/list-pools#parameter-min-volume24h) minVolume24h integer | null Minimum 24h volume in asset B. [​](https://docs.flashnet.xyz/api-reference/pools/list-pools#parameter-min-tvl) minTvl integer | null Minimum TVL in asset B. [​](https://docs.flashnet.xyz/api-reference/pools/list-pools#parameter-curve-types) curveTypes string\[\] Pool curve types to filter by. [​](https://docs.flashnet.xyz/api-reference/pools/list-pools#parameter-sort) sort enum Sort order for results. Available options: `CREATED_AT_DESC`, `CREATED_AT_ASC`, `UPDATED_AT_DESC`, `UPDATED_AT_ASC`, `VOLUME24H_DESC`, `VOLUME24H_ASC`, `TVL_DESC`, `TVL_ASC` [​](https://docs.flashnet.xyz/api-reference/pools/list-pools#parameter-limit) limit integer | null Maximum number of pools to return. [​](https://docs.flashnet.xyz/api-reference/pools/list-pools#parameter-offset) offset integer | null Number of pools to skip before starting to collect the result set. [​](https://docs.flashnet.xyz/api-reference/pools/list-pools#parameter-after-updated-at) afterUpdatedAt string | null Return only pools that have had swaps after this timestamp (RFC3339). #### Response 200 application/json Pools retrieved successfully Response type for listing pools, matching the `OpenAPI` specification. [​](https://docs.flashnet.xyz/api-reference/pools/list-pools#response-pools) pools object\[\] required The list of pool details. Show child attributes [​](https://docs.flashnet.xyz/api-reference/pools/list-pools#response-total-count) totalCount integer required The total number of pools available. Was this page helpful? YesNo [Settlement Health Check (uses grpc.health.v1 Health/Check)\ \ Previous](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) [Create CP Pool\ \ Next](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) ⌘I --- # Get LP Position - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Pools Get LP Position [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get LP Position cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/pools/{poolId}/lp/{providerPublicKey} \ --header 'Authorization: Bearer ' 200 example Copy Ask AI { "lpTokensOwned": "1000000.00000000", "poolId": "0315299b3f9f4e2beb8576ea2bf72ea1bc741eb255bfc3f6387de4d47b5c05972d", "principalAssetA": 2000000000, "principalAssetB": 1000000, "providerPublicKey": "03b06b7c3e39bf922be19b7ad5f19554bb7991cae585ed2e3374d51213ff4eeb3c", "sharePercentage": "25.5", "unrealizedProfitLossAssetA": 500000000, "unrealizedProfitLossAssetB": 250000, "valueAssetA": 250000000, "valueAssetB": 1250000} GET https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / pools / {poolId} / lp / {providerPublicKey} Try it Get LP Position cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/pools/{poolId}/lp/{providerPublicKey} \ --header 'Authorization: Bearer ' 200 example Copy Ask AI { "lpTokensOwned": "1000000.00000000", "poolId": "0315299b3f9f4e2beb8576ea2bf72ea1bc741eb255bfc3f6387de4d47b5c05972d", "principalAssetA": 2000000000, "principalAssetB": 1000000, "providerPublicKey": "03b06b7c3e39bf922be19b7ad5f19554bb7991cae585ed2e3374d51213ff4eeb3c", "sharePercentage": "25.5", "unrealizedProfitLossAssetA": 500000000, "unrealizedProfitLossAssetB": 250000, "valueAssetA": 250000000, "valueAssetB": 1250000} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Path Parameters [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#parameter-pool-id) poolId string required The LP public key of the pool [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#parameter-provider-public-key) providerPublicKey string required The public key of the liquidity provider #### Response 200 application/json LP position details retrieved successfully Response type matching the `OpenAPI` specification for LP position details. [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#response-provider-public-key) providerPublicKey string required The public key of the liquidity provider. [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#response-pool-id) poolId string required The unique identifier of the pool. [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#response-lp-tokens-owned) lpTokensOwned string required The number of LP tokens owned by the provider (in smallest units). Example: `"50250000.00000000"` [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#response-share-percentage) sharePercentage string required The provider's share of the pool, as a string (e.g., "0.05" for 5%). Example: `"0.05"` [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#response-value-asset-a) valueAssetA integer required The current value of the provider's position in asset A (in smallest units). Required range: `x >= 0` Example: `"5025000"` [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#response-value-asset-b) valueAssetB integer required The current value of the provider's position in asset B (in smallest units). Required range: `x >= 0` Example: `"2500125"` [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#response-principal-asset-a) principalAssetA integer | null The principal amount of asset A originally deposited by the provider (in smallest units). Required range: `x >= 0` Example: `"4800000"` [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#response-principal-asset-b) principalAssetB integer | null The principal amount of asset B originally deposited by the provider (in smallest units). Required range: `x >= 0` Example: `"2400000"` [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#response-unrealized-profit-loss-asset-a) unrealizedProfitLossAssetA string | null The unrealized profit or loss in asset A (in smallest units). Example: `"225000"` [​](https://docs.flashnet.xyz/api-reference/pools/get-lp-position#response-unrealized-profit-loss-asset-b) unrealizedProfitLossAssetB string | null The unrealized profit or loss in asset B (in smallest units). Example: `"100125"` Was this page helpful? YesNo [Get Pool\ \ Previous](https://docs.flashnet.xyz/api-reference/pools/get-pool) [Get Pool Swaps\ \ Next](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) ⌘I --- # Get Pool - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/pools/get-pool#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Pools Get Pool [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get Pool cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/pools/{poolId} 200 404 500 Copy Ask AI { "assetAAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17", "assetAReserve": "1049999900", "assetBAddress": "020202020202020202020202020202020202020202020202020202020202020202", "assetBReserve": "496", "bondingProgressPercent": "15.5", "createdAt": "2025-01-15T10:09:58.09646Z", "currentPriceAInB": "0.00000004761904807256236", "curveType": "SINGLE_SIDED", "hostFeeBps": 100, "hostName": "my-cool-exchange", "initialReserveA": "1000000000", "lpFeeBps": 500, "lpPublicKey": "0315299b3f9f4e2beb8576ea2bf72ea1bc741eb255bfc3f6387de4d47b5c05972d", "priceChangePercent24h": "-5.25", "status": "ACTIVE", "thresholdPct": 80, "tvlAssetB": "992", "updatedAt": "2025-01-15T12:30:45.12345Z", "virtualReserveA": "1073741824", "virtualReserveB": "1073741824", "volume24hAssetB": "500" } GET https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / pools / {poolId} Try it Get Pool cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/pools/{poolId} 200 404 500 Copy Ask AI { "assetAAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17", "assetAReserve": "1049999900", "assetBAddress": "020202020202020202020202020202020202020202020202020202020202020202", "assetBReserve": "496", "bondingProgressPercent": "15.5", "createdAt": "2025-01-15T10:09:58.09646Z", "currentPriceAInB": "0.00000004761904807256236", "curveType": "SINGLE_SIDED", "hostFeeBps": 100, "hostName": "my-cool-exchange", "initialReserveA": "1000000000", "lpFeeBps": 500, "lpPublicKey": "0315299b3f9f4e2beb8576ea2bf72ea1bc741eb255bfc3f6387de4d47b5c05972d", "priceChangePercent24h": "-5.25", "status": "ACTIVE", "thresholdPct": 80, "tvlAssetB": "992", "updatedAt": "2025-01-15T12:30:45.12345Z", "virtualReserveA": "1073741824", "virtualReserveB": "1073741824", "volume24hAssetB": "500" } #### Path Parameters [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#parameter-pool-id) poolId string required The LP public key of the pool to retrieve #### Response 200 application/json Pool details retrieved successfully Enhanced pool details response with comprehensive data. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-lp-public-key) lpPublicKey string required LP public key (pool identifier). [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-host-fee-bps) hostFeeBps integer required Host fee in basis points (from settlement DB). [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-lp-fee-bps) lpFeeBps integer required LP fee rate in basis points. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-asset-a-address) assetAAddress string required Asset A token address. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-asset-b-address) assetBAddress string required Asset B token address. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-asset-a-reserve) assetAReserve string required Current reserve of asset A. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-asset-b-reserve) assetBReserve string required Current reserve of asset B. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-current-price-a-in-b) currentPriceAInB string required Current price of asset A in terms of asset B. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-tvl-asset-b) tvlAssetB string required Total value locked in asset B. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-volume24h-asset-b) volume24hAssetB string required 24-hour volume in asset B. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-price-change-percent24h) priceChangePercent24h string required 24-hour price change percentage. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-curve-type) curveType string required Pool curve type. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-created-at) createdAt string required Creation timestamp. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-updated-at) updatedAt string required Last update timestamp. [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-status) status string required Pool status (active, disabled, etc). [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-host-name) hostName string | null Host name (human-readable). [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-virtual-reserve-a) virtualReserveA string | null Virtual reserve A (for bonding curve calculations). [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-virtual-reserve-b) virtualReserveB string | null Virtual reserve B (for bonding curve calculations). [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-threshold-pct) thresholdPct integer | null Percent of asset A sold to become a constant product pool. Required range: `x >= 0` [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-initial-reserve-a) initialReserveA string | null Initial reserve A for bonding curve (only for single-sided pools). [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-bonding-progress-percent) bondingProgressPercent string Bonding progress percentage (only for single-sided pools). [​](https://docs.flashnet.xyz/api-reference/pools/get-pool#response-graduation-threshold-amount) graduationThresholdAmount string | null Graduation threshold amount in asset A for single-sided pools. Was this page helpful? YesNo [Confirm Initial Deposit\ \ Previous](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) [Get LP Position\ \ Next](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ⌘I --- # Create Bonding Pool - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Pools Create Bonding Pool [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Create Bonding Pool cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/pools/single-sided \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "assetAAddress": "0338d6978bd3163d1547f9ddb8b215d1c163bc7b4a552e559b89057f5449ba69de", "assetAInitialReserve": "1000000000", "assetBAddress": "020202020202020202020202020202020202020202020202020202020202020202", "graduationThresholdPct": 50, "hostNamespace": "my-cool-exchange", "lpFeeRateBps": "500", "nonce": "550e8400-e29b-41d4-a716-446655440000", "poolOwnerPublicKey": "03b06b7c3e39bf922be19b7ad5f19554bb7991cae585ed2e3374d51213ff4eeb3c", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3", "targetBRaisedAtGraduation": "10000000000", "totalHostFeeRateBps": "200" }' 202 example Copy Ask AI { "message": "Pool created successfully. Please deposit initial liquidity to activate the pool.", "poolId": "03poollpidentitypubkeyfedcba9876543210fedcba9876543210fedcba9876"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / pools / single-sided Try it Create Bonding Pool cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/pools/single-sided \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "assetAAddress": "0338d6978bd3163d1547f9ddb8b215d1c163bc7b4a552e559b89057f5449ba69de", "assetAInitialReserve": "1000000000", "assetBAddress": "020202020202020202020202020202020202020202020202020202020202020202", "graduationThresholdPct": 50, "hostNamespace": "my-cool-exchange", "lpFeeRateBps": "500", "nonce": "550e8400-e29b-41d4-a716-446655440000", "poolOwnerPublicKey": "03b06b7c3e39bf922be19b7ad5f19554bb7991cae585ed2e3374d51213ff4eeb3c", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3", "targetBRaisedAtGraduation": "10000000000", "totalHostFeeRateBps": "200" }' 202 example Copy Ask AI { "message": "Pool created successfully. Please deposit initial liquidity to activate the pool.", "poolId": "03poollpidentitypubkeyfedcba9876543210fedcba9876543210fedcba9876"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Single-sided pool creation parameters including bonding curve configuration and fee settings Request body for creating a new single-sided AMM pool. Single-sided pools allow liquidity providers to deposit only one asset (asset A), while the pool creates a Linear Price Ramp bonding curve against a paired asset (asset B). This is useful for launching new tokens with price discovery and initial liquidity. [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#body-pool-owner-public-key) poolOwnerPublicKey string required Public key of the pool owner who will control the pool. Must match the authenticated user's public key. Example: `"03b06b7c3e39bf922be19b7ad5f19554bb7991cae585ed2e3374d51213ff4eeb3c"` [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#body-asset-a-address) assetAAddress string required Address of asset A (the deposited asset). This is the asset that liquidity providers will deposit. Example: `"0338d6978bd3163d1547f9ddb8b215d1c163bc7b4a552e559b89057f5449ba69de"` [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#body-asset-b-address) assetBAddress string required Address of asset B (the paired asset). This asset forms the other side of the trading pair. Example: `"020202020202020202020202020202020202020202020202020202020202020202"` [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#body-asset-a-initial-reserve) assetAInitialReserve integer required Initial reserve amount for asset A in the smallest unit. This is the actual amount that will be deposited into the pool. Required range: `x >= 0` Example: `"1000000000"` [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#body-virtual-reserve-a) virtualReserveA integer required Virtual reserve amount for asset A in the smallest unit. This is the amount that will be used to calculate the price of the pool. Required range: `x >= 0` Example: `"5000000000"` [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#body-virtual-reserve-b) virtualReserveB integer required Virtual reserve amount for asset B in the smallest unit. This is the amount that will be used to calculate the price of the pool. Required range: `x >= 0` Example: `"10000000000"` [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#body-threshold) threshold integer required Amount of asset A that must be sold to graduate to constant product. Required range: `x >= 0` Example: `"1000000000"` [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#body-lp-fee-rate-bps) lpFeeRateBps integer required Liquidity provider fee rate in basis points (BPS). 1 BPS = 0.01%, so 500 BPS = 5% fee. Required range: `x >= 0` Example: `500` [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#body-total-host-fee-rate-bps) totalHostFeeRateBps integer required Total host fee rate in basis points (BPS). Includes both host and Flashnet fees. Must be validated based on host configuration. Required range: `x >= 0` Example: `200` [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#body-nonce) nonce string required Unique `nonce` for replay protection. Must be a unique value that hasn't been used before. Example: `"550e8400-e29b-41d4-a716-446655440000"` [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#body-signature) signature string required Hex-encoded secp256k1 signature of the request. Must be signed by the private key corresponding to `pool_owner_public_key`. Example: `"3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3"` [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#body-host-namespace) hostNamespace string | null Optional host namespace for fee sharing. If provided, fees will be shared with the specified host. Example: `"my-cool-exchange"` #### Response 202 application/json Pool creation initiated. Initial deposit required to activate pool. Response for pool creation [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#response-pool-id) poolId string required Pool ID (LP public key) Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool#response-message) message string required Human-readable confirmation message Example: `"Pool created successfully"` Was this page helpful? YesNo [Create CP Pool\ \ Previous](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) [Confirm Initial Deposit\ \ Next](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) ⌘I --- # Execute Route Swap - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Swaps Execute Route Swap [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Execute Route Swap cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/route-swap \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "hops": [\ {\ "assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000",\ "assetOutAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111",\ "hopIntegratorFeeRateBps": "50",\ "poolId": "03pool1aabbccddeeff00112233445566778899aabbccddeeff00112233445566778"\ },\ {\ "assetInAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111",\ "assetOutAddress": "03usdstablecoinpubkey2222222222222222222222222222222222222222222222",\ "hopIntegratorFeeRateBps": "50",\ "poolId": "03pool2bbccddeeffffaabbccddeeff00112233445566778899aabbccddeeff0011"\ }\ ], "initialSparkTransferId": "spark-transfer-uuid-or-hash-for-initial-deposit", "inputAmount": "100000000", "integratorFeeRateBps": "100", "integratorPublicKey": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "maxRouteSlippageBps": "200", "minAmountOut": "100000000", "nonce": "unique-route-swap-nonce-456", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3", "userPublicKey": "02abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" }' 200 Rejection Copy Ask AI { "accepted": false, "error": "Insufficient liquidity in hop 2", "executionPrice": "0", "finalOutboundTransferId": "", "outputAmount": "0", "refundTransferId": "spark-transfer-refund-999", "refundedAmount": "100000000", "refundedAssetPublicKey": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000", "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / route-swap Try it Execute Route Swap cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/route-swap \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "hops": [\ {\ "assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000",\ "assetOutAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111",\ "hopIntegratorFeeRateBps": "50",\ "poolId": "03pool1aabbccddeeff00112233445566778899aabbccddeeff00112233445566778"\ },\ {\ "assetInAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111",\ "assetOutAddress": "03usdstablecoinpubkey2222222222222222222222222222222222222222222222",\ "hopIntegratorFeeRateBps": "50",\ "poolId": "03pool2bbccddeeffffaabbccddeeff00112233445566778899aabbccddeeff0011"\ }\ ], "initialSparkTransferId": "spark-transfer-uuid-or-hash-for-initial-deposit", "inputAmount": "100000000", "integratorFeeRateBps": "100", "integratorPublicKey": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "maxRouteSlippageBps": "200", "minAmountOut": "100000000", "nonce": "unique-route-swap-nonce-456", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3", "userPublicKey": "02abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" }' 200 Rejection Copy Ask AI { "accepted": false, "error": "Insufficient liquidity in hop 2", "executionPrice": "0", "finalOutboundTransferId": "", "outputAmount": "0", "refundTransferId": "spark-transfer-refund-999", "refundedAmount": "100000000", "refundedAssetPublicKey": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000", "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Route swap execution details including hop sequence and authentication Defines the request to execute a swap across a defined route of liquidity pools. [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#body-user-public-key) userPublicKey string required The public key of the user initiating the swap. Must match the key in the auth token. Example: `"02abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#body-hops) hops object\[\] required An ordered sequence of pools and assets that defines the swap route. Must contain 1-4 hops. Show child attributes Example: [ { "assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000", "assetOutAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111", "hopIntegratorFeeRateBps": "25", "poolId": "03pool1aabbccddeeff00112233445566778899aabbccddeeff00112233445566778" }, { "assetInAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111", "assetOutAddress": "03usdstablecoinpubkey2222222222222222222222222222222222222222222222", "hopIntegratorFeeRateBps": "25", "poolId": "03pool2bbccddeeffffaabbccddeeff00112233445566778899aabbccddeeff0011" }] [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#body-initial-spark-transfer-id) initialSparkTransferId string required The unique identifier of the Spark transfer for the initial input asset deposit. Example: `"spark-route-transfer-uuid-123456"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#body-input-amount) inputAmount integer required The total amount of the input asset to be swapped, in its smallest unit. Required range: `x >= 0` Example: `100000000` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#body-max-route-slippage-bps) maxRouteSlippageBps integer required The maximum acceptable slippage for the entire route, in basis points. Required range: `x >= 0` Example: `200` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#body-min-amount-out) minAmountOut integer required The minimum amount of the final output asset the user agrees to receive. Required range: `x >= 0` Example: `100000000` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#body-nonce) nonce string required A unique, user-generated string to prevent replay attacks. Example: `"unique-route-swap-nonce-789"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#body-signature) signature string required Cryptographic signature of the request payload for verification. Example: `"3045022100b8c9d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6789012345678901234567890123402207f6e5d4c3b2a1908f7e6d5c4b3a29180706f5e4d3c2b1a0908070605040302010"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#body-integrator-fee-rate-bps) integratorFeeRateBps integer | null An optional default fee in basis points for the route integrator. Required range: `x >= 0` Example: `50` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#body-integrator-public-key) integratorPublicKey string | null The public key of the integrator to receive fees. Required if `integrator_fee_rate_bps` is set. Example: `"03integratorpubkey33445566778899aabbccddeeff00112233445566778899aa"` #### Response 200 application/json Route swap execution successful Represents the response after a route swap execution attempt. [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#response-request-id) requestId string required A unique identifier for the request, for tracing and logging. [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#response-accepted) accepted boolean required Indicates whether the route swap was accepted for processing. [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#response-output-amount) outputAmount integer required The final amount of the output asset received, in its smallest unit. Required range: `x >= 0` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#response-execution-price) executionPrice string required The effective price of the swap, calculated as `output_amount` / `input_amount`. [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#response-final-outbound-transfer-id) finalOutboundTransferId string required The unique identifier of the final Spark transfer for the output asset. [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#response-error) error string | null If the swap failed, this field contains a description of the error. [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#response-refunded-asset-address) refundedAssetAddress string | null If the swap failed and a refund was issued, this is the public key of the refunded asset. [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#response-refunded-amount) refundedAmount integer | null The amount of the refunded asset. Required range: `x >= 0` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap#response-refund-transfer-id) refundTransferId string | null The unique identifier of the refund transfer on Spark. Was this page helpful? YesNo [Get Pool Swaps\ \ Previous](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) [Simulate Route Swap\ \ Next](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) ⌘I --- # Simulate Swap - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Swaps Simulate Swap [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Simulate Swap cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/swap/simulate \ --header 'Content-Type: application/json' \ --data '{ "amountIn": 100000000, "assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000", "assetOutAddress": "03usdstablecoinpubkey111111111111111111111111111111111111111111111", "integratorBps": 25, "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899" }' 200 example Copy Ask AI { "amountOut": 4950000, "executionPrice": "0.00004950", "feePaidAssetIn": 50000, "priceImpactPct": "0.51%", "warningMessage": null} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / swap / simulate Try it Simulate Swap cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/swap/simulate \ --header 'Content-Type: application/json' \ --data '{ "amountIn": 100000000, "assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000", "assetOutAddress": "03usdstablecoinpubkey111111111111111111111111111111111111111111111", "integratorBps": 25, "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899" }' 200 example Copy Ask AI { "amountOut": 4950000, "executionPrice": "0.00004950", "feePaidAssetIn": 50000, "priceImpactPct": "0.51%", "warningMessage": null} #### Body application/json Swap simulation parameters including pool, assets, and amount Request body for simulating a swap without executing it. Simulation allows users to preview swap outcomes including expected output, price impact, and fees before committing to the transaction. [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap#body-pool-id) poolId string required LP public key of the pool to simulate the swap through. The pool must exist and be active. Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap#body-asset-in-address) assetInAddress string required Address of the asset the user would provide. Must be one of the two assets in the selected pool. Example: `"03bitcoinassetpubkey0000000000000000000000000000000000000000000000"` [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap#body-asset-out-address) assetOutAddress string required Address of the asset the user wants to receive. Must be the other asset in the selected pool. Example: `"03usdstablecoinpubkey111111111111111111111111111111111111111111111"` [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap#body-amount-in) amountIn integer required Amount of input asset to simulate swapping, in its smallest unit. Must be positive. Larger amounts will show greater price impact. Required range: `x >= 0` Example: `100000000` [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap#body-integrator-bps) integratorBps integer | null Optional integrator fee rate in basis points applied on the input amount. 25 bps = 0.25% Required range: `x >= 0` Example: `25` #### Response 200 application/json Simulation completed successfully Response from swap simulation with expected outcomes. [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap#response-amount-out) amountOut integer required Expected amount of output asset the user would receive, in its smallest unit. This is after all fees are deducted. Required range: `x >= 0` Example: `4950000` [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap#response-execution-price) executionPrice string | null Effective execution price of the swap. Shows how many units of output asset per unit of input asset. Example: `"0.00004950"` [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap#response-fee-paid-asset-in) feePaidAssetIn integer | null Total fee paid denominated in the input asset only. For B->A swaps, this includes LP, host, and integrator fees (all charged in B). For A->B swaps, host and integrator fees are charged in the output asset (B) and are therefore not included here; only the LP fee (in A) is reported. Required range: `x >= 0` Example: `50000` [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap#response-price-impact-pct) priceImpactPct string | null Price impact of the swap as a percentage. Higher values indicate more slippage from the ideal price. Example: `"0.51%"` [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap#response-warning-message) warningMessage string | null Warning message if the simulation detects potential issues. Common warnings include high slippage or low liquidity. Example: `"High price impact detected"` Was this page helpful? YesNo [Execute Swap\ \ Previous](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) [Get Swaps\ \ Next](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) ⌘I --- # Simulate Route Swap - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Swaps Simulate Route Swap [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Simulate Route Swap cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/route-swap/simulate \ --header 'Content-Type: application/json' \ --data '{ "amountIn": "100000000", "hops": [\ {\ "assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000",\ "assetOutAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111",\ "poolId": "03pool1aabbccddeeff00112233445566778899aabbccddeeff00112233445566778"\ },\ {\ "assetInAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111",\ "assetOutAddress": "03usdstablecoinpubkey2222222222222222222222222222222222222222222222",\ "poolId": "03pool2bbccddeeffffaabbccddeeff00112233445566778899aabbccddeeff0011"\ }\ ], "maxRouteSlippageBps": "100" }' 200 HighImpact Copy Ask AI { "executionPrice": "0.94", "hopBreakdown": [ { "amountIn": "100000000", "amountOut": "4850000", "poolId": "03pool1aabbccddeeff00112233445566778899aabbccddeeff00112233445566778", "priceImpactPct": "3.00%" }, { "amountIn": "4850000", "amountOut": "94000000", "poolId": "03pool2bbccddeeffffaabbccddeeff00112233445566778899aabbccddeeff0011", "priceImpactPct": "3.50%" } ], "outputAmount": "94000000", "totalHostFees": "1500000", "totalLpFees": "3000000", "totalPriceImpactPct": "6.50%", "warningMessage": "High total price impact"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / route-swap / simulate Try it Simulate Route Swap cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/route-swap/simulate \ --header 'Content-Type: application/json' \ --data '{ "amountIn": "100000000", "hops": [\ {\ "assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000",\ "assetOutAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111",\ "poolId": "03pool1aabbccddeeff00112233445566778899aabbccddeeff00112233445566778"\ },\ {\ "assetInAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111",\ "assetOutAddress": "03usdstablecoinpubkey2222222222222222222222222222222222222222222222",\ "poolId": "03pool2bbccddeeffffaabbccddeeff00112233445566778899aabbccddeeff0011"\ }\ ], "maxRouteSlippageBps": "100" }' 200 HighImpact Copy Ask AI { "executionPrice": "0.94", "hopBreakdown": [ { "amountIn": "100000000", "amountOut": "4850000", "poolId": "03pool1aabbccddeeff00112233445566778899aabbccddeeff00112233445566778", "priceImpactPct": "3.00%" }, { "amountIn": "4850000", "amountOut": "94000000", "poolId": "03pool2bbccddeeffffaabbccddeeff00112233445566778899aabbccddeeff0011", "priceImpactPct": "3.50%" } ], "outputAmount": "94000000", "totalHostFees": "1500000", "totalLpFees": "3000000", "totalPriceImpactPct": "6.50%", "warningMessage": "High total price impact"} #### Body application/json Route simulation details including hop sequence and input amount Defines the request for simulating a swap across a defined route of liquidity pools. [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap#body-hops) hops object\[\] required An ordered sequence of pools and assets that defines the swap route. Must contain at least 2 hops and no more than 4 hops. Show child attributes Example: [ { "assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000", "assetOutAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111", "poolId": "03pool1aabbccddeeff00112233445566778899aabbccddeeff00112233445566778" }, { "assetInAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111", "assetOutAddress": "03usdstablecoinpubkey2222222222222222222222222222222222222222222222", "poolId": "03pool2bbccddeeffffaabbccddeeff00112233445566778899aabbccddeeff0011" }] [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap#body-amount-in) amountIn integer required The total amount of the input asset to be swapped, in its smallest unit. Required range: `x >= 0` Example: `100000000` [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap#body-max-route-slippage-bps) maxRouteSlippageBps integer required The maximum acceptable slippage for the entire route, in basis points (0-10000). Required range: `x >= 0` Example: `100` #### Response 200 application/json Route simulation successful Represents the complete simulation result for the requested route swap. [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap#response-output-amount) outputAmount integer required The estimated final amount of the output asset to be received, in its smallest unit. Required range: `x >= 0` [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap#response-execution-price) executionPrice string required The estimated effective price of the swap, calculated as `output_amount` / `input_amount`. [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap#response-total-lp-fees) totalLpFees integer required The total estimated fees paid to liquidity providers across all hops. Required range: `x >= 0` [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap#response-total-host-fees) totalHostFees integer required The total estimated fees paid to pool hosts across all hops. Required range: `x >= 0` [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap#response-total-price-impact-pct) totalPriceImpactPct string required The total estimated price impact for the entire route as a percentage string. [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap#response-hop-breakdown) hopBreakdown object\[\] required A detailed breakdown of the simulation results for each hop in the route. Show child attributes [​](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap#response-warning-message) warningMessage string | null An optional warning message, e.g., if the calculated slippage exceeds the user's maximum setting. Was this page helpful? YesNo [Execute Route Swap\ \ Previous](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) [Execute Swap\ \ Next](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) ⌘I --- # Get User Swaps - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Swaps Get User Swaps [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get User Swaps cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/swaps/user/{userPublicKey} 200 404 500 Copy Ask AI { "swaps": [\ {\ "amountIn": "1000000",\ "amountOut": "500000",\ "assetInAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",\ "assetOutAddress": "020202020202020202020202020202020202020202020202020202020202020202",\ "createdAt": "2025-01-15T10:30:00Z",\ "feePaid": "5000",\ "id": "550e8400-e29b-41d4-a716-446655440000",\ "inboundTransferId": "550e8400-e29b-41d4-a716-446655440001",\ "outboundTransferId": "550e8400-e29b-41d4-a716-446655440001",\ "poolAssetAAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",\ "poolAssetBAddress": "020202020202020202020202020202020202020202020202020202020202020202",\ "poolLpPublicKey": "0315299b3f9f4e2beb8576ea2bf72ea1bc741eb255bfc3f6387de4d47b5c05972d",\ "price": "0.5"\ }\ ], "totalCount": 25 } GET https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / swaps / user / {userPublicKey} Try it Get User Swaps cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/swaps/user/{userPublicKey} 200 404 500 Copy Ask AI { "swaps": [\ {\ "amountIn": "1000000",\ "amountOut": "500000",\ "assetInAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",\ "assetOutAddress": "020202020202020202020202020202020202020202020202020202020202020202",\ "createdAt": "2025-01-15T10:30:00Z",\ "feePaid": "5000",\ "id": "550e8400-e29b-41d4-a716-446655440000",\ "inboundTransferId": "550e8400-e29b-41d4-a716-446655440001",\ "outboundTransferId": "550e8400-e29b-41d4-a716-446655440001",\ "poolAssetAAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",\ "poolAssetBAddress": "020202020202020202020202020202020202020202020202020202020202020202",\ "poolLpPublicKey": "0315299b3f9f4e2beb8576ea2bf72ea1bc741eb255bfc3f6387de4d47b5c05972d",\ "price": "0.5"\ }\ ], "totalCount": 25 } #### Path Parameters [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#parameter-user-public-key) userPublicKey string required The public key of the user whose swaps to retrieve #### Query Parameters [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#parameter-pool-lp-pubkey) poolLpPubkey string | null Filter by pool LP public key. [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#parameter-asset-in-address) assetInAddress string | null Filter by asset in token public key. [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#parameter-asset-out-address) assetOutAddress string | null Filter by asset out token public key. [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#parameter-min-amount-in) minAmountIn integer | null Minimum amount in. [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#parameter-max-amount-in) maxAmountIn integer | null Maximum amount in. [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#parameter-start-time) startTime string | null Start timestamp (inclusive) in RFC3339 format. [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#parameter-end-time) endTime string | null End timestamp (inclusive) in RFC3339 format. [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#parameter-sort) sort enum Sort order for results. Available options: `timestampDesc`, `timestampAsc`, `amountInDesc`, `amountInAsc`, `amountOutDesc`, `amountOutAsc` [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#parameter-limit) limit integer | null default:20 Maximum number of swaps to return. Required range: `1 <= x <= 100` [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#parameter-offset) offset integer | null default:0 Number of swaps to skip before starting to collect the result set. Required range: `x >= 0` #### Response 200 application/json User swap history retrieved successfully Response for listing user swaps [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#response-swaps) swaps object\[\] required List of swap events Show child attributes [​](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps#response-total-count) totalCount integer required Total count for pagination Example: `25` Was this page helpful? YesNo [Get Swaps\ \ Previous](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) ⌘I --- # Execute Swap - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Swaps Execute Swap [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Execute Swap cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/swap \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "amountIn": "100000000", "assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000", "assetInSparkTransferId": "spark-transfer-uuid-or-hash-for-asset-in", "assetOutAddress": "03usdstablecoinpubkey111111111111111111111111111111111111111111111", "integratorPublicKey": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "maxSlippageBps": "50", "nonce": "unique-swap-nonce-123", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3", "totalIntegratorFeeRateBps": "100", "userPublicKey": "02abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" }' 200 Rejection Copy Ask AI { "accepted": false, "error": "Insufficient liquidity in pool", "refundTransferId": "spark-transfer-refund-456", "refundedAmount": 100000000, "refundedAssetAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000", "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW"} POST https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / swap Try it Execute Swap cURL Copy Ask AI curl --request POST \ --url https://api.amm.flashnet.xyz/v1/swap \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "amountIn": "100000000", "assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000", "assetInSparkTransferId": "spark-transfer-uuid-or-hash-for-asset-in", "assetOutAddress": "03usdstablecoinpubkey111111111111111111111111111111111111111111111", "integratorPublicKey": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "maxSlippageBps": "50", "nonce": "unique-swap-nonce-123", "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899", "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3", "totalIntegratorFeeRateBps": "100", "userPublicKey": "02abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" }' 200 Rejection Copy Ask AI { "accepted": false, "error": "Insufficient liquidity in pool", "refundTransferId": "spark-transfer-refund-456", "refundedAmount": 100000000, "refundedAssetAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000", "requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW"} #### Authorizations [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json Swap execution details including assets, amounts, and authentication Request body for executing a swap on an AMM pool. Swaps allow users to exchange one asset for another through a liquidity pool. The swap is executed atomically and the result is returned immediately. [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#body-user-public-key) userPublicKey string required Public key of the user executing the swap. Must match the authenticated user's public key. Example: `"02abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#body-pool-id) poolId string required LP public key of the pool to swap through. The pool must be active and have sufficient liquidity. Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#body-asset-in-address) assetInAddress string required Public key of the asset being provided by the user. Must be one of the two assets in the selected pool. Example: `"03bitcoinassetpubkey0000000000000000000000000000000000000000000000"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#body-asset-out-address) assetOutAddress string required Public key of the asset the user wants to receive. Must be the other asset in the selected pool. Example: `"03usdstablecoinpubkey111111111111111111111111111111111111111111111"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#body-amount-in) amountIn integer required Amount of input asset to swap, in its smallest unit. Must be positive and within the pool's liquidity capacity. Required range: `x >= 0` Example: `100000000` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#body-max-slippage-bps) maxSlippageBps integer required Optional maximum slippage tolerance in basis points (BPS). If set, can override `min_amount_out`. 1 BPS = 0.01%, so 50 BPS = 0.5%. Required range: `x >= 0` Example: `50` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#body-min-amount-out) minAmountOut integer required Optional mininimum amount out If set to none, 0 Required range: `x >= 0` Example: `100000000` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#body-asset-in-spark-transfer-id) assetInSparkTransferId string required Spark network transfer ID proving the deposit of input asset. Must be a valid, confirmed transfer to the pool's address. Example: `"spark-transfer-uuid-or-hash-for-asset-in"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#body-nonce) nonce string required Unique `nonce` for replay protection. Each swap must use a unique `nonce` that hasn't been used before. Example: `"unique-swap-nonce-123"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#body-total-integrator-fee-rate-bps) totalIntegratorFeeRateBps integer required Total integrator fee the user accepts to pay. Required range: `x >= 0` Example: `100` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#body-integrator-public-key) integratorPublicKey string required Integrator public key. Example: `"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#body-signature) signature string required Hex-encoded secp256k1 signature of the request. Must be signed by the private key corresponding to `user_public_key`. Example: `"3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3"` #### Response 200 application/json Swap executed successfully Clean response for a successfully executed swap operation [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#response-request-id) requestId string required User-friendly request ID for tracking Example: `"01HJZKFABCDEFGHJKLMNPQRSTVW"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#response-accepted) accepted boolean required Whether the swap was accepted or rejected Example: `true` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#response-amount-out) amountOut integer | null Amount received from the swap (populated if accepted) Required range: `x >= 0` Example: `"495000"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#response-fee-amount) feeAmount integer | null Fee paid for the swap (populated if accepted) Required range: `x >= 0` Example: `"5000"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#response-execution-price) executionPrice string | null Execution price as a string (populated if accepted) Example: `"0.00495000"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#response-asset-out-address) assetOutAddress string | null Asset received by the user (populated if accepted) Example: `"03usdstablecoinpubkey111111111111111111111111111111111111111111111"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#response-asset-in-address) assetInAddress string | null Asset sent by the user (populated if accepted) Example: `"03bitcoinassetpubkey0000000000000000000000000000000000000000000000"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#response-outbound-transfer-id) outboundTransferId string | null Spark transfer ID for receiving asset (populated if accepted) Example: `"spark-transfer-out-123"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#response-error) error string | null User-friendly error message (populated if rejected) Example: `"Insufficient liquidity in pool"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#response-refunded-asset-address) refundedAssetAddress string | null Refunded asset (populated if rejected) Example: `"03bitcoinassetpubkey0000000000000000000000000000000000000000000000"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#response-refunded-amount) refundedAmount integer | null Refunded amount (populated if rejected) Required range: `x >= 0` Example: `"100000000"` [​](https://docs.flashnet.xyz/api-reference/swaps/execute-swap#response-refund-transfer-id) refundTransferId string | null Spark transfer ID for refund (populated if rejected) Example: `"spark-transfer-refund-456"` Was this page helpful? YesNo [Simulate Route Swap\ \ Previous](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) [Simulate Swap\ \ Next](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) ⌘I --- # Get Swaps - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/swaps/get-swaps#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Swaps Get Swaps [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get Swaps cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/swaps 200 500 Copy Ask AI { "swaps": [\ {\ "amountIn": "1000000",\ "amountOut": "500000",\ "assetInAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",\ "assetOutAddress": "020202020202020202020202020202020202020202020202020202020202020202",\ "createdAt": "2025-01-15T10:30:00Z",\ "feePaid": "5000",\ "id": "550e8400-e29b-41d4-a716-446655440000",\ "inboundTransferId": "550e8400-e29b-41d4-a716-446655440001",\ "outboundTransferId": "550e8400-e29b-41d4-a716-446655440001",\ "poolAssetAAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",\ "poolAssetBAddress": "020202020202020202020202020202020202020202020202020202020202020202",\ "poolLpPublicKey": "0315299b3f9f4e2beb8576ea2bf72ea1bc741eb255bfc3f6387de4d47b5c05972d",\ "poolType": "CONSTANT_PRODUCT",\ "price": "0.5",\ "swapperPublicKey": "03a1b2c3d4e5f6789012345678901234567890123456789012345678901234567890"\ }\ ], "totalCount": 1500 } GET https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / swaps Try it Get Swaps cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/swaps 200 500 Copy Ask AI { "swaps": [\ {\ "amountIn": "1000000",\ "amountOut": "500000",\ "assetInAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",\ "assetOutAddress": "020202020202020202020202020202020202020202020202020202020202020202",\ "createdAt": "2025-01-15T10:30:00Z",\ "feePaid": "5000",\ "id": "550e8400-e29b-41d4-a716-446655440000",\ "inboundTransferId": "550e8400-e29b-41d4-a716-446655440001",\ "outboundTransferId": "550e8400-e29b-41d4-a716-446655440001",\ "poolAssetAAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",\ "poolAssetBAddress": "020202020202020202020202020202020202020202020202020202020202020202",\ "poolLpPublicKey": "0315299b3f9f4e2beb8576ea2bf72ea1bc741eb255bfc3f6387de4d47b5c05972d",\ "poolType": "CONSTANT_PRODUCT",\ "price": "0.5",\ "swapperPublicKey": "03a1b2c3d4e5f6789012345678901234567890123456789012345678901234567890"\ }\ ], "totalCount": 1500 } #### Query Parameters [​](https://docs.flashnet.xyz/api-reference/swaps/get-swaps#parameter-limit) limit integer | null default:20 Maximum number of swaps to return in the response. Helps manage response size when dealing with large swap volumes. Required range: `1 <= x <= 100` [​](https://docs.flashnet.xyz/api-reference/swaps/get-swaps#parameter-offset) offset integer | null default:0 Number of swaps to skip before starting to collect results. Used for paginating through large result sets. Required range: `x >= 0` [​](https://docs.flashnet.xyz/api-reference/swaps/get-swaps#parameter-pool-type) pool\_type string | null Filter by pool type (`CONSTANT_PRODUCT` or `SINGLE_SIDED`). If not specified, returns swaps from all pool types. [​](https://docs.flashnet.xyz/api-reference/swaps/get-swaps#parameter-asset-address) asset\_address string | null Filter by asset address (will match either input or output asset). Useful for finding all swaps involving a specific asset. [​](https://docs.flashnet.xyz/api-reference/swaps/get-swaps#parameter-start-time) start\_time string | null Start timestamp (inclusive) in RFC3339 format. [​](https://docs.flashnet.xyz/api-reference/swaps/get-swaps#parameter-end-time) end\_time string | null End timestamp (inclusive) in RFC3339 format. #### Response 200 application/json Global swap history retrieved successfully Response for listing global swaps [​](https://docs.flashnet.xyz/api-reference/swaps/get-swaps#response-swaps) swaps object\[\] required List of swap events Show child attributes [​](https://docs.flashnet.xyz/api-reference/swaps/get-swaps#response-total-count) totalCount integer required Total count of swaps (for pagination) Example: `1500` Was this page helpful? YesNo [Simulate Swap\ \ Previous](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) [Get User Swaps\ \ Next](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) ⌘I --- # Get Pool Swaps - Flashnet [Skip to main content](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Swaps Get Pool Swaps [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close Get Pool Swaps cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/pools/{lpPubkey}/swaps 200 404 500 Copy Ask AI { "swaps": [\ {\ "amountIn": "1000000",\ "amountOut": "500000",\ "assetInAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",\ "assetOutAddress": "020202020202020202020202020202020202020202020202020202020202020202",\ "createdAt": "2025-01-15T10:30:00Z",\ "feePaid": "5000",\ "id": "550e8400-e29b-41d4-a716-446655440000",\ "inboundTransferId": "550e8400-e29b-41d4-a716-446655440001",\ "outboundTransferId": "550e8400-e29b-41d4-a716-446655440001",\ "price": "0.5",\ "swapperPublicKey": "03a1b2c3d4e5f6789012345678901234567890123456789012345678901234567890"\ }\ ], "totalCount": 150 } GET https://api.amm.flashnet.xyzhttps://api.amm.makebitcoingreatagain.dev / v1 / pools / {lpPubkey} / swaps Try it Get Pool Swaps cURL Copy Ask AI curl --request GET \ --url https://api.amm.flashnet.xyz/v1/pools/{lpPubkey}/swaps 200 404 500 Copy Ask AI { "swaps": [\ {\ "amountIn": "1000000",\ "amountOut": "500000",\ "assetInAddress": "66471063147ab9f53515bf18d1cea9a8ad166840ba9de93d46018d7007426e17",\ "assetOutAddress": "020202020202020202020202020202020202020202020202020202020202020202",\ "createdAt": "2025-01-15T10:30:00Z",\ "feePaid": "5000",\ "id": "550e8400-e29b-41d4-a716-446655440000",\ "inboundTransferId": "550e8400-e29b-41d4-a716-446655440001",\ "outboundTransferId": "550e8400-e29b-41d4-a716-446655440001",\ "price": "0.5",\ "swapperPublicKey": "03a1b2c3d4e5f6789012345678901234567890123456789012345678901234567890"\ }\ ], "totalCount": 150 } #### Path Parameters [​](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps#parameter-lp-pubkey) lpPubkey string required The LP public key identifying the pool #### Query Parameters [​](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps#parameter-limit) limit integer | null default:20 Maximum number of swaps to return in the response. Helps manage response size for pools with many swaps. Required range: `1 <= x <= 100` [​](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps#parameter-offset) offset integer | null default:0 Number of swaps to skip before starting to collect results. Used for paginating through large result sets. Required range: `x >= 0` [​](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps#parameter-start-time) startTime string | null Start timestamp (inclusive) in RFC3339 format. [​](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps#parameter-end-time) endTime string | null End timestamp (inclusive) in RFC3339 format. #### Response 200 application/json Swap history retrieved successfully Response for listing pool swaps [​](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps#response-swaps) swaps object\[\] required List of swap events Show child attributes [​](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps#response-total-count) totalCount integer required Total count of swaps (for pagination) Example: `150` Was this page helpful? YesNo [Get LP Position\ \ Previous](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) [Execute Route Swap\ \ Next](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) ⌘I --- # Introducing Flashnet - Flashnet [Skip to main content](https://docs.flashnet.xyz/introduction#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Getting Started Introducing Flashnet [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [What is Flashnet?](https://docs.flashnet.xyz/introduction#what-is-flashnet%3F) * [What is Spark?](https://docs.flashnet.xyz/introduction#what-is-spark%3F) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/hero-light.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=cd84cf15982618905c98b63d43917649) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/hero-dark.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=582f2cee0e78da552ee3565c9081fbe0) [​](https://docs.flashnet.xyz/introduction#what-is-flashnet%3F) What is Flashnet? ------------------------------------------------------------------------------------ Flashnet is a modular exchange stack for Bitcoin. It is designed to rival the performance of TradFi exchange systems without any of the custody, and without introducing blockchain-related innefficiencies to execution. This is facilitated by [Spark](https://spark.money/) , a UTXO scaling solution we helped build that enables near-instant, zero-fee settlement of Bitcoin and other assets. Flashnet powers any type of market with native Bitcoin settlement. ### [​](https://docs.flashnet.xyz/introduction#what-is-spark%3F) What is Spark? ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/spark-light.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=481e7ecb2439c50181ec23f2ca31dbe0) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/spark-dark.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=87c0d328ff2d5991f6e691e454cdc06e) Spark scales Bitcoin using pure cryptographic messaging. Learn more [here](https://docs.spark.money/spark/spark-tldr) . Spark is not a blockchain, and as such does not suffer from the same bottlenecks as most L2’s such as bridging, block creation, transaction ordering, or consensus. The user retains the power to unilaterally exit at all times, even with open orders on Flashnet. Was this page helpful? YesNo [Architecture\ \ Next](https://docs.flashnet.xyz/architecture) ⌘I --- # Architecture - Flashnet [Skip to main content](https://docs.flashnet.xyz/architecture#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Getting Started Architecture [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Overview](https://docs.flashnet.xyz/architecture#overview) * [Core Primitives](https://docs.flashnet.xyz/architecture#core-primitives) * [Atomic Swap](https://docs.flashnet.xyz/architecture#atomic-swap) * [Intents System](https://docs.flashnet.xyz/architecture#intents-system) * [AMM](https://docs.flashnet.xyz/architecture#amm) * [Centralized Limit-Orderbook](https://docs.flashnet.xyz/architecture#centralized-limit-orderbook) [​](https://docs.flashnet.xyz/architecture#overview) Overview ---------------------------------------------------------------- Flashnet leverages several key primitives facilitated through [Spark](https://docs.spark.info/spark/spark-tldr) to enable secure, efficient trading. All solutions are built on the foundation of non-custody and the atomic swap primitive. Depending on the product requirements, we implement different approaches: * For trustless flows like our RFQ system, we simply rely on vanilla atomic swaps with no external coordination other than quote discovery * For advanced solutions like our CLOB or AMM, we combine TEEs and validators to enable intent-based execution at settlement — funds stay completely in the user’s control and trust is only required during execution. [​](https://docs.flashnet.xyz/architecture#core-primitives) Core Primitives ------------------------------------------------------------------------------ ### [​](https://docs.flashnet.xyz/architecture#atomic-swap) Atomic Swap The atomic swap is the fundamental building block of Flashnet. On Spark, atomic swaps are implemented using adaptor signatures, where the exchange is enforced by L1 validation and Bitcoin consensus rules. This creates a trustless exchange mechanism between two parties. ### [​](https://docs.flashnet.xyz/architecture#intents-system) Intents System ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/intent-light.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=d9e245fd97d37859d9897bdb5e64ba1a) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/intent-dark.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=817015782693137f21413b9d8369f78e) Our intent-based execution engine is powered by validators operating within TEEs. All trading interactions are modeled as maker/taker relationships. The engine verifies that both parties have properly expressed their intent to trade and then securely settles the transaction according to the agreed terms. Two key design principles guide our intent-based execution environment: 1. **Minimal exposure window**: Each execution environment is designed with the shortest possible lifecycle, ensuring funds are only exposed during the brief settlement period and not subject to long-term holding risks unless the user explicitly opts to hold. (market makers, LPing, etc. where it makes more sense to have a long-term exposure) 2. **Isolated MPC wallets**: Rather than using a single shared MPC wallet, each user operates with multiple dedicated MPC wallets, ensuring that if one wallet is compromised, the others remain secure and isolated from system-wide risk. This engine is at the core of our trust-minimized products like Flashnet Trade and Flashnet AMM. It distributes trust across multiple validators, who do intent verification before signing off on transactions to be executed natively on Spark. This enables us to have quasi-smart contract execution without the overhead of a full-fledged smart contract VM, while still providing similar security guarantees. You can think about this as an application specific validation layer for Spark. ### [​](https://docs.flashnet.xyz/architecture#amm) AMM ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/amm-light.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=56c04c72ddff9344fd8dd187fb3bfc41) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/amm-dark.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=cd94c85e85cd67504880c24c37d14916) Our AMM operates within our intent based execution environment, where liquidity providers interact through MPC wallets. Users can swap tokens/BTC or contribute liquidity to these pools. The AMM supports different pricing mechanisms to suit different trading needs, including constant product, custom bonding curves, and concentrated liquidity positions. ### [​](https://docs.flashnet.xyz/architecture#centralized-limit-orderbook) Centralized Limit-Orderbook ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/clob-light.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=a8a655536e1b3a78de097046ee5946d6) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/clob-dark.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=eeed9ef9ae164ec9dcdb7209c8fe219e) Our CLOB powers the Flashnet Trade product with a state-of-the-art matching engine which matches orders based on price / time priority. Key components include: * Advanced matching engine for efficient order execution * Settlement via our intent-based execution engine with validator oversight * User-controlled delegated trading wallets using threshold signature schemes * Safety mechanisms allowing users to: * Exit unilaterally to L1 * Coordinate exit via Spark transaction * Cancel orders at any time to revoke approval and recover locked funds You can learn more about the CLOB in the [how it works](https://docs.flashnet.xyz/products/flashnet-trade/overview) section of Flashnet Trade. Was this page helpful? YesNo [Introducing Flashnet\ \ Previous](https://docs.flashnet.xyz/introduction) [Trust Model\ \ Next](https://docs.flashnet.xyz/architecture/trust-model) ⌘I --- # Trust Model - Flashnet [Skip to main content](https://docs.flashnet.xyz/architecture/trust-model#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Getting Started Trust Model [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Why the Split Works](https://docs.flashnet.xyz/architecture/trust-model#why-the-split-works) * [Security Assumptions](https://docs.flashnet.xyz/architecture/trust-model#security-assumptions) * [Failure Scenarios](https://docs.flashnet.xyz/architecture/trust-model#failure-scenarios) Flashnet executes complex actions (AMM pool creation, swaps, CLOB, escrow, etc.) without a general-purpose VM by combining three independent actors. The model deliberately splits authority so that **no single party can move funds or mutate state**. | Actor | Non-delegable responsibilities | | --- | --- | | **User** | 1\. Signs an **intent** that encodes the desired state change.
2\. Funds the on-spark address referenced in the intent.
3\. Chooses a fee and nonce, retaining unilateral ability to cancel by spending these funds elsewhere before execution. | | **Validator₁…Validatorₙ** | 1\. Hold one Shamir shard `Shardᵢ` for every on-spark `Seed`, with threshold `m ≤ n` required for reconstruction.
2\. Independently verify every incoming intent: signature, nonce freshness, expiry, fee correctness, and required on-spark balance.
3\. If valid, emit an **attestation** `{intent_hash, sigᵢ, enc(Shardᵢ, TEE_pk)}` and forward it to the TEE.
4\. Slashable for withholding shards or signing invalid intents. | | **TEE** | 1\. Publishes a verifiable remote-attestation quote proving the expected enclave software.
2\. Runs the deterministic Spark state-transition logic.
3\. Creates a new `Seed` when persistent state is required and secret-shares it to validators.
4\. Waits for _m_ distinct attestations. Only then reconstructs the `Seed`, claims funds, and emits the resulting Spark transaction + event. | [​](https://docs.flashnet.xyz/architecture/trust-model#why-the-split-works) Why the Split Works -------------------------------------------------------------------------------------------------- 1. **Custody stays with the user** until the very moment all validators agree the intent is valid; the TEE cannot act without the shards, and validators cannot act without the enclave. 2. **m-of-n secret sharing** permits liveness with up to `n − m` offline or malicious validators while preventing sub-threshold collusion. 3. **Deterministic enclave code + remote attestation** constrains the TEE to a publicly auditable state machine. 4. **Accountability** means that any validator who withholds shards or signs a bad intent can be proven dishonest and penalised. [​](https://docs.flashnet.xyz/architecture/trust-model#security-assumptions) Security Assumptions ---------------------------------------------------------------------------------------------------- 1. The enclave’s hardware isolation (e.g. SGX or Nitro) prevents key extraction; compromised hardware would be detected via failed remote attestation. 2. At least **m** validators are honest and responsive; liveness requires this quorum. 3. Spark finality ensures that once the tx is signed the state transition is immutable and can be sequenced to Bitcoin. [​](https://docs.flashnet.xyz/architecture/trust-model#failure-scenarios) Failure Scenarios ---------------------------------------------------------------------------------------------- * **Validators offline (< n − m)** – Execution proceeds once a quorum `m` attestations are collected. * **Validators offline (≥ n − m)** – Execution pauses until governance replaces missing validators or rotates the pool. * **TEE downtime** – Validators keep collecting attestations; nothing can be executed until the enclave restarts and proves freshness via attestation quote. Was this page helpful? YesNo [Architecture\ \ Previous](https://docs.flashnet.xyz/architecture) [AMM\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/overview) ⌘I --- # AMM - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/overview#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Flashnet Amm AMM [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Constant Product AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview#constant-product-amm) * [Bonding Curve AMM (Single-Sided)](https://docs.flashnet.xyz/products/flashnet-amm/overview#bonding-curve-amm-single-sided) * [Price Mechanism](https://docs.flashnet.xyz/products/flashnet-amm/overview#price-mechanism) * [Concentrated Liquidity AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview#concentrated-liquidity-amm) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/amm-light.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=56c04c72ddff9344fd8dd187fb3bfc41) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/amm-dark.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=cd94c85e85cd67504880c24c37d14916) Flashnet AMM powers automated markets for the long-tail of assets, allowing its users to be passive liquidity providers and grow nascent markets. Flashnet AMMs can be either single sided or double sided. The liquidity for AMMs lives on the Flashnet settlement layer, which is secured by a set of validators and can only move with valid intent. When trading against the AMM, the flow follows the [Flashnet Trade](https://docs.flashnet.xyz/products/flashnet-trade/overview) flow, with the exception that the AMM is used as the counterparty and no matching engine is required. [​](https://docs.flashnet.xyz/products/flashnet-amm/overview#constant-product-amm) Constant Product AMM ---------------------------------------------------------------------------------------------------------- The constant product AMM is a simple `y * x = k` curve that allows users to deposit two assets and enable them to be traded against each other. The price of the assets is determined by the ratio of the two assets in the pool. ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/xykchart.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=e7feb762da2d6ae904c3bd1240f24e6f) The mathematical model follows: * Price(A) = Reserve\_B / Reserve\_A * Trade execution follows: `(Reserve_A + ΔA - fees) * (Reserve_B - ΔB) = k` where k is the constant product of the reserves. [​](https://docs.flashnet.xyz/products/flashnet-amm/overview#bonding-curve-amm-single-sided) Bonding Curve AMM (Single-Sided) -------------------------------------------------------------------------------------------------------------------------------- The single-sided AMM uses a bonding curve for gradual price discovery, making it ideal for launching new tokens. It allows a creator to supply tokens and define a price curve that evolves as the tokens are sold. Once a certain amount of the supply is sold, the pool “graduates” into a standard constant product AMM. ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/bondingchart.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=4eb12dca618145a691a4c1ad1df9d3e7) ### [​](https://docs.flashnet.xyz/products/flashnet-amm/overview#price-mechanism) Price Mechanism We model single‑sided sales with virtual reserves that sit on a constant‑product curve. Let initial virtual reserves be `v_A^0` and `v_B^0` with `k_v = v_A^0 * v_B^0`. As tokens are sold, we maintain: * `current_v_a = v_A^0 - tokens_sold` * `current_v_b = v_B^0 + quote_raised` The instantaneous price is: `P = current_v_b / current_v_a` Swaps update virtual reserves using constant product math: * Buy A with B (B→A): `new_v_b = current_v_b + ΔB`, `new_v_a = k_v / new_v_b`, output `ΔA = current_v_a - new_v_a`. * Sell A for B (A→B): `new_v_a = current_v_a + ΔA`, `new_v_b = k_v / new_v_a`, output `ΔB = current_v_b - new_v_b`. [​](https://docs.flashnet.xyz/products/flashnet-amm/overview#concentrated-liquidity-amm) Concentrated Liquidity AMM ---------------------------------------------------------------------------------------------------------------------- The concentrated liquidity AMM implementation allows liquidity providers to concentrate their capital within specific price ranges, similar to Uniswap V3. This enables more capital-efficient liquidity provision compared to traditional constant product AMMs. ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/concentratedchart.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=83547a5ffbb9b103c53363d2603750ce) The mathematical model follows concentrated liquidity formulas: * **Liquidity Calculation**: * Below range: `L = (ΔA * sqrt(P_upper) * sqrt(P_lower)) / (sqrt(P_upper) - sqrt(P_lower))` * Above range: `L = ΔB / (sqrt(P_upper) - sqrt(P_lower))` * Within range: `L = min(L_A, L_B)` where both assets may be required * **Swap Execution**: Swaps traverse tick boundaries, activating/deactivating liquidity as price moves * **Fee Growth Tracking**: Global and per-position fee growth is tracked for accurate fee distribution Was this page helpful? YesNo [Trust Model\ \ Previous](https://docs.flashnet.xyz/architecture/trust-model) [How it works\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ⌘I --- # How it works - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Flashnet Amm How it works [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Trading process](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works#trading-process) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/amm-light.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=56c04c72ddff9344fd8dd187fb3bfc41) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/amm-dark.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=cd94c85e85cd67504880c24c37d14916) Flashnet AMM enables native swaps by computing LP state and executing in the Flashnet intent based execution layer. The trust is distributed against the set of validators, and minimally incurred for anyone swapping against the pool. LPs incur more trust due to the long-ended nature of their position. ### [​](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works#trading-process) Trading process The LP is a pool controlled by a set of validators, coordinating in a TEE. Flashnet’s distributed validator network ensures the AMM fairness and execution, whilst Spark’s validator network ensures the swap finality and settlement. **1\. Creating a pool** To swap, a pool must exist. Creation happens by signing an intent payload with information like: * Pool type * Assets in the pool * Fee rates * Misc pool details (e.g., virtual reserve parameters and graduation threshold for single‑sided) The signed payload is then given to the execution stack, that generates a distributed LP wallet for the pool. This is returned to the user in the form of an address. **2\. Adding Liquidity** * For single-sided pools, the creator must deposit the declared Asset A amount. The SDK transfers funds and confirms the deposit automatically. * For constant product pools, deposit both assets in the current pool ratio. Excess amounts are atomically refunded. * Provide `assetAMinAmountIn` and `assetBMinAmountIn` to protect against price movement during deposit. * Validators validate the intent and claim funds into the LP. * The pool becomes live after a valid deposit. **3\. Swapping** * The user can now swap against the pool. First, simulate to preview expected output and price impact. Then sign a swap intent with `maxSlippageBps` and `minAmountOut`, transfer funds, and submit the signed intent. The validators validate and execute the swap atomically. * The swap settles instantly, and funds are swapped directly to the users non-custodial wallet. Host and integrator fees are taken exclusively in Asset B of the pool. LP fees are taken as asset in. Was this page helpful? YesNo [AMM\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/overview) [Setup\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/setup) ⌘I --- # Setup - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/setup#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Quick Start Setup [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Installation](https://docs.flashnet.xyz/products/flashnet-amm/setup#installation) * [Initialization](https://docs.flashnet.xyz/products/flashnet-amm/setup#initialization) * [Using the Spark wallet from the client](https://docs.flashnet.xyz/products/flashnet-amm/setup#using-the-spark-wallet-from-the-client) Before you can interact with Flashnet AMM, you need to set up the Flashnet SDK and initialize a client with your wallet. This guide will walk you through the installation and initialization process. [​](https://docs.flashnet.xyz/products/flashnet-amm/setup#installation) Installation --------------------------------------------------------------------------------------- Install the required packages: Copy Ask AI npm install @flashnet/sdk @buildonspark/spark-sdk # or yarn add @flashnet/sdk @buildonspark/spark-sdk # or bun add @flashnet/sdk @buildonspark/spark-sdk [​](https://docs.flashnet.xyz/products/flashnet-amm/setup#initialization) Initialization ------------------------------------------------------------------------------------------- Create a new instance of the Flashnet client with your Spark wallet: Copy Ask AI import { FlashnetClient } from '@flashnet/sdk'; import { SparkWallet } from '@buildonspark/spark-sdk'; // Initialize your Spark wallet const { wallet } = await SparkWallet.initialize({ mnemonicOrSeed: process.env.MNEMONIC, options: { network: "REGTEST", }, }); // Create the Flashnet client const client = new FlashnetClient(wallet); await client.initialize(); // The client will automatically: // - Authenticate with the AMM service // - Handle all signing and intent generation [​](https://docs.flashnet.xyz/products/flashnet-amm/setup#using-the-spark-wallet-from-the-client) Using the Spark wallet from the client ------------------------------------------------------------------------------------------------------------------------------------------- The client can also be used as a regular Spark wallet: Copy Ask AI import { FlashnetClient } from '@flashnet/sdk'; import { SparkWallet } from '@buildonspark/spark-sdk'; // Initialize your Spark wallet const { wallet } = await SparkWallet.initialize({ mnemonicOrSeed: process.env.MNEMONIC, options: { network: "REGTEST", }, }); // Create the Flashnet client const client = new FlashnetClient(wallet); await client.initialize(); const invoice = await client.wallet.createLightningInvoice({ amountSats: 1000000, memo: "Test invoice", }); console.log(invoice); Was this page helpful? YesNo [How it works\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) [Config & Gating\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/config) ⌘I --- # Config & Gating - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/config#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Quick Start Config & Gating [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Overview](https://docs.flashnet.xyz/products/flashnet-amm/config#overview) * [Allowed Assets](https://docs.flashnet.xyz/products/flashnet-amm/config#allowed-assets) * [Minimum Amounts](https://docs.flashnet.xyz/products/flashnet-amm/config#minimum-amounts) * [Feature Status](https://docs.flashnet.xyz/products/flashnet-amm/config#feature-status) * [Notes on Caching](https://docs.flashnet.xyz/products/flashnet-amm/config#notes-on-caching) * [TLDR;](https://docs.flashnet.xyz/products/flashnet-amm/config#tldr%3B) [​](https://docs.flashnet.xyz/products/flashnet-amm/config#overview) Overview -------------------------------------------------------------------------------- * **Allowed Assets** (`/v1/config/allowed-assets`): Governs which assets can be used as Asset B when creating pools. Acts as an RPC‑level allowlist, useful at launch. * **Minimum Amounts** (`/v1/config/min-amounts`): Enforces minimum sizes for swaps and liquidity ops. * **Feature Status** (`/v1/config/feature-status`): Toggles features on/off across the stack (used during incidents with Spark/SSP/infra). The `FlashnetClient` exposes helpers to read these configs and already enforces them automatically before executing sensitive operations. You can also read them to guide your UI. [​](https://docs.flashnet.xyz/products/flashnet-amm/config#allowed-assets) Allowed Assets -------------------------------------------------------------------------------------------- Controls which assets are permitted as Asset B for pool creation. * Endpoint: `/v1/config/allowed-assets` * Behavior: If the list is empty, all assets are allowed (wildcard). Otherwise, only entries with `enabled: true` are allowed. * SDK behavior: `createConstantProductPool` and `createSingleSidedPool` will fail early if Asset B is not allowed. Example: pre‑check in UI before enabling the “Create Pool” button. Copy Ask AI // Fetch policy (cached ~60s internally) const allowed = await client.getAllowedAssets(); // If empty => wildcard allowed; else enforce exact hex asset identifier match function isAssetBAllowed(assetBHex: string): boolean { if (!allowed || allowed.length === 0) return true; return allowed.some( (it) => it.enabled && it.asset_identifier.toLowerCase() === assetBHex.toLowerCase() ); } // Example usage const canCreate = isAssetBAllowed(""); Note: The client already enforces this. Use the pre‑check to provide better UX. [​](https://docs.flashnet.xyz/products/flashnet-amm/config#minimum-amounts) Minimum Amounts ---------------------------------------------------------------------------------------------- Defines per‑asset minimums used to validate swaps and liquidity operations. * Endpoint: `/v1/config/min-amounts` * Rules: * If the input asset has a minimum → `input_amount >= min_amount`. * If the output asset has a minimum → `min_amount_out >= min_amount` with 50% slippage tolerance applied. * If both assets have minimums → input asset check takes priority. * Same rules apply to liquidity adds and removals (each asset checked; output sides use the 50% relaxed rule). * SDK behavior: `executeSwap`, `executeRouteSwap`, `addLiquidity`, and `removeLiquidity` all validate these rules before sending funds or intents. You can read the policy to inform inputs and validations in your UI. Copy Ask AI // Raw list (for display) const list = await client.getMinAmounts(); // Map keyed by HEX asset identifier (lowercased) => bigint minimum (only enabled entries) const minMap = await client.getMinAmountsMap(); function getMinFor(assetHex: string): bigint | undefined { return minMap.get(assetHex.toLowerCase()); } // Example: validate a swap form function validateSwap({ assetInHex, assetOutHex, amountIn, minAmountOut }: { assetInHex: string; assetOutHex: string; amountIn: bigint; minAmountOut: bigint; }): string | undefined { const inMin = getMinFor(assetInHex); const outMin = getMinFor(assetOutHex); if (inMin && amountIn < inMin) { return `Minimum for input asset is ${inMin.toString()}`; } if (!inMin && outMin) { const relaxed = outMin / 2n; // 50% slippage tolerance if (minAmountOut < relaxed) { return `Minimum for output asset is ${relaxed.toString()} (50% relaxed)`; } } return undefined; } Note: The client enforces the same logic at execution time; the above helps you block invalid inputs early. [​](https://docs.flashnet.xyz/products/flashnet-amm/config#feature-status) Feature Status -------------------------------------------------------------------------------------------- Global kill‑switches and per‑feature flags that gate AMM operations. * Endpoint: `/v1/config/feature-status` * Example flags: `master_kill_switch`, `allow_swaps`, `allow_add_liquidity`, `allow_withdraw_liquidity`, `allow_pool_creation`, `allow_route_swaps`, `allow_withdraw_fees`. * SDK behavior: All state‑changing methods call an internal guard that throws if the required feature is disabled or if the master kill switch is active. Use the helpers to conditionally enable UI actions and to display maintenance notices. Copy Ask AI // Map, cached briefly const flags = await client.getFeatureFlags(); const isServiceDown = flags.get("master_kill_switch") === true; const canSwap = flags.get("allow_swaps") === true; const canCreatePools = flags.get("allow_pool_creation") === true; if (isServiceDown) { // Show site‑wide banner: read‑only mode } // Disable buttons based on flags // swapButton.disabled = !canSwap // createPoolButton.disabled = !canCreatePools [​](https://docs.flashnet.xyz/products/flashnet-amm/config#notes-on-caching) Notes on Caching ------------------------------------------------------------------------------------------------ The SDK caches these reads briefly to reduce network load: * Feature flags: ~5s TTL * Min amounts: ~5s TTL (map of enabled entries only) * Allowed assets: ~60s TTL Reads are refreshed automatically after the TTL expires. [​](https://docs.flashnet.xyz/products/flashnet-amm/config#tldr%3B) TLDR; ---------------------------------------------------------------------------- * Use `getAllowedAssets()` to pre‑screen Asset B for pool creation. * Use `getMinAmounts()` / `getMinAmountsMap()` to validate UI inputs for swaps and liquidity. * Use `getFeatureFlags()` to toggle UI actions and show maintenance states. * All execution methods in the SDK already enforce these policies server‑side and client‑side for safety. Was this page helpful? YesNo [Setup\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/setup) [Pool Creation\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/creation) ⌘I --- # Pool Creation - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/creation#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Quick Start Pool Creation [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Pool Types](https://docs.flashnet.xyz/products/flashnet-amm/creation#pool-types) * [Single-Sided Pools (Bonding Curve)](https://docs.flashnet.xyz/products/flashnet-amm/creation#single-sided-pools-bonding-curve) * [Double-Sided Pools (Constant Product)](https://docs.flashnet.xyz/products/flashnet-amm/creation#double-sided-pools-constant-product) * [Prerequisites](https://docs.flashnet.xyz/products/flashnet-amm/creation#prerequisites) * [Creating a Constant Product Pool](https://docs.flashnet.xyz/products/flashnet-amm/creation#creating-a-constant-product-pool) * [Creating a Single-Sided Pool](https://docs.flashnet.xyz/products/flashnet-amm/creation#creating-a-single-sided-pool) * [Fee Configuration](https://docs.flashnet.xyz/products/flashnet-amm/creation#fee-configuration) * [Fee Constraints](https://docs.flashnet.xyz/products/flashnet-amm/creation#fee-constraints) * [Complete Example: Pool Creation and Management](https://docs.flashnet.xyz/products/flashnet-amm/creation#complete-example%3A-pool-creation-and-management) * [Error Handling](https://docs.flashnet.xyz/products/flashnet-amm/creation#error-handling) * [Next Steps](https://docs.flashnet.xyz/products/flashnet-amm/creation#next-steps) You can create both single-sided and double-sided pools with the Flashnet SDK. The SDK handles all the complexity of intent generation, signing, and multi-step processes automatically. [​](https://docs.flashnet.xyz/products/flashnet-amm/creation#pool-types) Pool Types -------------------------------------------------------------------------------------- ### [​](https://docs.flashnet.xyz/products/flashnet-amm/creation#single-sided-pools-bonding-curve) Single-Sided Pools (Bonding Curve) * **Goal**: Gradually discover price as tokens sell, then “graduate” into a normal constant-product pool. * **Mechanism**: Single-sided pools are modeled using virtual reserves that move on a constant‑product curve. The creator deposits an initial supply of Asset A; price evolves as virtual reserves update with sales. * **Graduation**: Once a specified percentage of Asset A is sold, the accumulated Asset B and remaining Asset A are used to seed a new constant product pool. * **Target-Based Creation**: The SDK provides a helper to compute virtual reserves from your initial supply, graduation threshold, and target Asset B raised at graduation. ### [​](https://docs.flashnet.xyz/products/flashnet-amm/creation#double-sided-pools-constant-product) Double-Sided Pools (Constant Product) * Require initial deposits of both assets * Use actual reserves for pricing * Follow the constant product (`x*y=k`) formula * Better for liquid markets In the Flashnet Stack, Bitcoin is always denominated as satoshis and bears the public key `020202020202020202020202020202020202020202020202020202020202020202`.Currently, Asset B must be Bitcoin, otherwise pool creation will fail. [​](https://docs.flashnet.xyz/products/flashnet-amm/creation#prerequisites) Prerequisites -------------------------------------------------------------------------------------------- Before creating pools, make sure you have [set up the Flashnet SDK client](https://docs.flashnet.xyz/products/flashnet-amm/setup) . This guide assumes you have already initialized the `client` instance, and that you have a wallet with either some BTC and LRC20 tokens, or two different LRC20 tokens. In our below examples we will use BTC and USDB, where BTC is denominated in sats (8 decimals) and USDB has 6 decimals. [​](https://docs.flashnet.xyz/products/flashnet-amm/creation#creating-a-constant-product-pool) Creating a Constant Product Pool ---------------------------------------------------------------------------------------------------------------------------------- Copy Ask AI // Create a constant product pool with initial liquidity async function createConstantProductPool() { try { const pool = await client.createConstantProductPool({ assetAAddress: "bitcoin-pubkey", assetBAddress: "usdb-pubkey", lpFeeRateBps: 30, // 0.3% LP fee totalHostFeeRateBps: 20, // 0.2% host fee hostNamespace: "my-namespace", // Optional: for host attribution initialLiquidity: { // Optional: add initial liquidity assetAAmount: 100000000n, // 1 BTC assetBAmount: 100000000000n, // 100,000 USDB assetAMinAmountIn: 100000000n, // Min Asset A to deposit assetBMinAmountIn: 100000000000n, // Min Asset B to deposit } }); console.log('Pool created:', pool); console.log('Pool ID:', pool.poolId); } catch (error) { console.error('Failed to create pool:', error); } } // Create a pool without initial liquidity async function createEmptyPool() { const pool = await client.createConstantProductPool({ assetAAddress: "bitcoin-pubkey", assetBAddress: "usdb-pubkey", lpFeeRateBps: 30, totalHostFeeRateBps: 20, }); console.log('Empty pool created. Add liquidity separately.'); } [​](https://docs.flashnet.xyz/products/flashnet-amm/creation#creating-a-single-sided-pool) Creating a Single-Sided Pool -------------------------------------------------------------------------------------------------------------------------- The SDK automatically handles the deposit and confirmation process: Copy Ask AI async function createSingleSidedPool() { try { // The SDK will automatically: // 1. Create the pool with a virtual-reserve price mechanism. // 2. Transfer the initial reserve of Asset A. // 3. Confirm the deposit. // 4. Graduate to a constant product pool when the threshold is met. // Compute virtual reserves from goals const { virtualReserveA, virtualReserveB, threshold } = FlashnetClient.calculateVirtualReserves({ initialTokenSupply: "1000000000000", // 1,000,000 USDB initial supply graduationThresholdPct: 80, // Graduate when 80% is sold (<= 95) targetRaise: "100000000", // Target to raise 1 BTC (in sats) }); const pool = await client.createSingleSidedPool({ assetAAddress: "usdb-pubkey", // The token being sold assetBAddress: "bitcoin-pubkey", // The token being raised assetAInitialReserve: "1000000000000", virtualReserveA: virtualReserveA.toString(), virtualReserveB: virtualReserveB.toString(), threshold: threshold.toString(), // Graduation threshold percentage lpFeeRateBps: 30, // 0.3% LP fee totalHostFeeRateBps: 50, // 0.5% host fee hostNamespace: "my-exchange" // Optional: for host attribution }); console.log('Single-sided pool created:', pool); console.log('Pool ID:', pool.poolId); } catch (error) { console.error('Failed to create pool:', error); } } [​](https://docs.flashnet.xyz/products/flashnet-amm/creation#fee-configuration) Fee Configuration ---------------------------------------------------------------------------------------------------- ### [​](https://docs.flashnet.xyz/products/flashnet-amm/creation#fee-constraints) Fee Constraints * **LP Fee**: Trading fee that goes to liquidity providers (typically 0.1-1%) * **Host Fee**: Additional fee for the host/integrator (0-1%) * **Total Fee**: Sum of LP and host fees charged to traders **Important**: If creating a pool with a `hostNamespace`, the `totalHostFeeRateBps` must be greater than or equal to the host’s registered `minFeeBps`. * If you do NOT provide a `hostNamespace`, the minimum `totalHostFeeRateBps` is 10 BPS. For single-sided pools, the graduation `threshold` (percentage sold) is capped at 95% by the underlying AMM math. Copy Ask AI // Check host requirements before creating pool async function createPoolWithHost(hostNamespace: string) { // Get host info to check minimum fee const hostInfo = await client.getHost(hostNamespace); console.log(`Host ${hostNamespace} requires minimum ${hostInfo.minFeeBps} BPS`); // Create pool meeting host requirements const pool = await client.createConstantProductPool({ assetAAddress: "bitcoin-pubkey", assetBAddress: "usdb-pubkey", lpFeeRateBps: 30, totalHostFeeRateBps: Math.max(50, hostInfo.minFeeBps), // Meet minimum hostNamespace: hostNamespace, }); console.log('Pool created with host:', pool); } [​](https://docs.flashnet.xyz/products/flashnet-amm/creation#complete-example%3A-pool-creation-and-management) Complete Example: Pool Creation and Management ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Copy Ask AI async function completePoolFlow() { // 1. Create a pool const pool = await client.createConstantProductPool({ assetAAddress: "bitcoin-pubkey", assetBAddress: "usdb-pubkey", lpFeeRateBps: 30, totalHostFeeRateBps: 20, initialLiquidity: { assetAAmount: 100000000n, // 1 BTC assetBAmount: 100000000000n, // 100,000 USDB assetAMinAmountIn: 100000000n, // Min Asset A to deposit assetBMinAmountIn: 100000000000n, // Min Asset B to deposit } }); const poolId = pool.poolId; console.log('Pool created:', poolId); // 2. Get pool details const poolInfo = await client.getPool(poolId); console.log('Pool info:', poolInfo); // 3. Check your LP position const position = await client.getLpPosition(poolId); console.log('Your LP tokens:', position.lpTokensOwned); console.log('Your share:', position.sharePercentage, '%'); // 4. Add more liquidity await client.addLiquidity({ poolId: poolId, assetAAmount: "50000000", // 0.5 BTC assetBAmount: "50000000000", // 50,000 USDB assetAMinAmountIn: "50000000", // set your acceptable minimums assetBMinAmountIn: "50000000000", }); console.log('Additional liquidity added'); // 5. List all pools (with filters) const pools = await client.listPools({ assetAAddress: "bitcoin-pubkey", assetBAddress: "usdb-pubkey", curveTypes: ["CONSTANT_PRODUCT"], }); console.log('Active BTC pools:', pools.pools.length); } [​](https://docs.flashnet.xyz/products/flashnet-amm/creation#error-handling) Error Handling ---------------------------------------------------------------------------------------------- Copy Ask AI async function createPoolWithErrorHandling() { try { // Compute virtual reserves from goals const { virtualReserveA, virtualReserveB, threshold } = FlashnetClient.calculateVirtualReserves({ initialTokenSupply: "1000000000000", // 1,000,000 USDB initial supply graduationThresholdPct: 80, // Graduate when 80% is sold targetRaise: "100000000", // Target to raise 1 BTC (in sats) }); const pool = await client.createSingleSidedPool({ assetAAddress: "usdb-pubkey", assetBAddress: "bitcoin-pubkey", assetAInitialReserve: "1000000000000", virtualReserveA: virtualReserveA.toString(), virtualReserveB: virtualReserveB.toString(), threshold: threshold.toString(), lpFeeRateBps: 30, totalHostFeeRateBps: 50, }); console.log('Success:', pool); } catch (error) { if (error.message.includes('Insufficient balance')) { console.error('Not enough funds to create pool'); } else if (error.message.includes('initial deposit failed')) { console.error('Pool created but deposit failed:', error.message); // The pool ID is included in the error message } else { console.error('Pool creation failed:', error); } } } [​](https://docs.flashnet.xyz/products/flashnet-amm/creation#next-steps) Next Steps -------------------------------------------------------------------------------------- After creating a pool, you can: 1. [Execute swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) against your pool 2. [Add more liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) to earn LP fees 3. [Remove liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) when needed Was this page helpful? YesNo [Config & Gating\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/config) [Liquidity\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) ⌘I --- # Liquidity - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Quick Start Liquidity [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Pool Types](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#pool-types) * [Simulate Before Adding](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#simulate-before-adding) * [Execute Liquidity Addition](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#execute-liquidity-addition) * [Optimal Amount Calculation](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#optimal-amount-calculation) * [Tracking Your Position](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#tracking-your-position) * [Monitor LP Holdings](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#monitor-lp-holdings) * [Calculate Returns](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#calculate-returns) * [Removing Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#removing-liquidity) * [Simulate Removal](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#simulate-removal) * [Execute Removal](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#execute-removal) * [Partial vs Full Removal](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#partial-vs-full-removal) * [Complete Liquidity Lifecycle](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#complete-liquidity-lifecycle) * [Error Handling](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#error-handling) * [Best Practices](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#best-practices) * [Next Steps](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#next-steps) The add and remove liquidity functions enable users to earn LP fees by providing liquidity to pools. ### [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#pool-types) Pool Types Users can only add liquidity to constant product pools. Single-sided pools only receive an initial deposit of asset A, at which point they trade against a bonding curve until they bond. Constant product pools require an initial deposit of both assets. ### [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#simulate-before-adding) Simulate Before Adding Adding liquidity has to be done in the right ratio to maintain the pool’s price. Always simulate to check expected LP tokens and potential refunds: Copy Ask AI async function simulateAddLiquidity() { try { const simulation = await client.simulateAddLiquidity({ poolId: "pool-public-key", assetAAmount: "100000000", // 1 BTC assetBAmount: "100000000000", // 100,000 USDB }); console.log('LP tokens to mint:', simulation.lpTokensToMint); console.log('Pool share %:', simulation.poolSharePercentage); console.log('Asset A refund:', simulation.assetARefundAmount); console.log('Asset B refund:', simulation.assetBRefundAmount); return simulation; } catch (error) { console.error('Simulation failed:', error); } } If you add liquidity in the wrong ratio, you will be atomically refunded the excess asset. ### [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#execute-liquidity-addition) Execute Liquidity Addition Copy Ask AI async function addLiquidity() { try { // First, check the pool to understand the current ratio const pool = await client.getPool("pool-id"); console.log('Current pool ratio:', pool.assetAReserve, ':', pool.assetBReserve); // Add liquidity maintaining the pool ratio const response = await client.addLiquidity({ poolId: "pool-id", assetAAmount: "100000000", // 1 BTC assetBAmount: "100000000000", // 100,000 USDB assetAMinAmountIn: "100000000", // set minimums to protect from price moves assetBMinAmountIn: "100000000000", }); console.log('Liquidity added successfully!'); console.log('LP tokens received:', response.lpTokensMinted); // Check if any assets were refunded if (response.refund) { console.log('Asset A refunded:', response.refund.assetAAmount); console.log('Asset B refunded:', response.refund.assetBAmount); } return response; } catch (error) { console.error('Failed to add liquidity:', error); } } ### [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#optimal-amount-calculation) Optimal Amount Calculation Avoid refunds by calculating optimal amounts: Copy Ask AI async function addLiquidityOptimal(poolId: string, assetADesired: bigint) { // Get current pool state const pool = await client.getPool(poolId); // Calculate optimal asset B amount based on current ratio const optimalAssetB = (assetADesired * BigInt(pool.assetBReserve)) / BigInt(pool.assetAReserve); console.log('Optimal amounts:', { assetA: assetADesired, assetB: optimalAssetB }); // Add liquidity with optimal amounts const response = await client.addLiquidity({ poolId: poolId, assetAAmount: assetADesired.toString(), assetBAmount: optimalAssetB.toString(), assetAMinAmountIn: assetADesired.toString(), assetBMinAmountIn: optimalAssetB.toString(), }); console.log('Added liquidity with no refunds'); return response; } [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#tracking-your-position) Tracking Your Position --------------------------------------------------------------------------------------------------------------- ### [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#monitor-lp-holdings) Monitor LP Holdings Copy Ask AI async function trackPosition(poolId: string) { // Get your current position const position = await client.getLpPosition(poolId); console.log('LP tokens owned:', position.lpTokensOwned); console.log('Pool share:', position.sharePercentage, '%'); console.log('Current value - Asset A:', position.valueAssetA); console.log('Current value - Asset B:', position.valueAssetB); // Check principal amounts if available if (position.principalAssetA !== undefined && position.principalAssetB !== undefined) { console.log('Initial deposit - Asset A:', position.principalAssetA); console.log('Initial deposit - Asset B:', position.principalAssetB); } // Check unrealized P&L if available if (position.unrealizedProfitLossAssetA && position.unrealizedProfitLossAssetB) { console.log('Unrealized P&L - Asset A:', position.unrealizedProfitLossAssetA); console.log('Unrealized P&L - Asset B:', position.unrealizedProfitLossAssetB); } return position; } ### [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#calculate-returns) Calculate Returns Track your investment performance: Copy Ask AI async function calculateReturns(poolId: string) { const position = await client.getLpPosition(poolId); // If principal amounts are available, calculate returns if (position.principalAssetA !== undefined && position.principalAssetB !== undefined) { const returnsA = position.valueAssetA - position.principalAssetA; const returnsB = position.valueAssetB - position.principalAssetB; // Calculate percentage returns const percentReturnA = position.principalAssetA > 0 ? (returnsA / position.principalAssetA) * 100 : 0; const percentReturnB = position.principalAssetB > 0 ? (returnsB / position.principalAssetB) * 100 : 0; console.log('Returns:'); console.log(`Asset A: ${returnsA} (${percentReturnA.toFixed(2)}%)`); console.log(`Asset B: ${returnsB} (${percentReturnB.toFixed(2)}%)`); } // The API provides unrealized P&L directly if (position.unrealizedProfitLossAssetA && position.unrealizedProfitLossAssetB) { console.log('Unrealized P&L from API:'); console.log(`Asset A: ${position.unrealizedProfitLossAssetA}`); console.log(`Asset B: ${position.unrealizedProfitLossAssetB}`); } // Check for impermanent loss const pool = await client.getPool(poolId); const currentPrice = Number(pool.reserveB) / Number(pool.reserveA); if (position.principalAssetA && position.principalAssetB) { const initialPrice = position.principalAssetB / position.principalAssetA; const priceChange = ((currentPrice - initialPrice) / initialPrice) * 100; console.log(`Price change since deposit: ${priceChange.toFixed(2)}%`); } } [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#removing-liquidity) Removing Liquidity ------------------------------------------------------------------------------------------------------- ### [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#simulate-removal) Simulate Removal Check what you’ll receive before removing: Copy Ask AI async function simulateRemoveLiquidity(poolId: string, lpTokensToRemove: string) { try { const simulation = await client.simulateRemoveLiquidity({ poolId: poolId, providerPublicKey: (await client.wallet.getIdentityPublicKey()), lpTokensToRemove: lpTokensToRemove, }); console.log('Expected asset A:', simulation.assetAAmount); console.log('Expected asset B:', simulation.assetBAmount); return simulation; } catch (error) { console.error('Simulation failed:', error); } } ### [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#execute-removal) Execute Removal Remove liquidity and claim accumulated fees: Copy Ask AI async function removeLiquidity(poolId: string, lpTokensToRemove: string) { try { // Check your LP balance first const position = await client.getLpPosition(poolId); const lpTokensOwned = BigInt(position.lpTokensOwned); const tokensToRemove = BigInt(lpTokensToRemove); if (lpTokensOwned < tokensToRemove) { throw new Error(`Insufficient LP tokens. Owned: ${lpTokensOwned}, Requested: ${tokensToRemove}`); } // Remove liquidity const response = await client.removeLiquidity({ poolId: poolId, lpTokensToRemove: lpTokensToRemove, }); console.log('Liquidity removed successfully!'); console.log('Asset A received:', response.assetAWithdrawn); console.log('Asset B received:', response.assetBWithdrawn); console.log('Transfers:', response.assetATransferId, response.assetBTransferId); return response; } catch (error) { console.error('Failed to remove liquidity:', error); } } ### [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#partial-vs-full-removal) Partial vs Full Removal Copy Ask AI // Remove all liquidity async function removeAllLiquidity(poolId: string) { const position = await client.getLpPosition(poolId); return await removeLiquidity(poolId, position.lpTokensOwned); } // Remove partial liquidity (e.g., 50%) async function removePartialLiquidity(poolId: string, percentage: number) { const position = await client.getLpPosition(poolId); const lpTokensToRemove = (BigInt(position.lpTokensOwned) * BigInt(percentage)) / 100n; return await removeLiquidity(poolId, lpTokensToRemove.toString()); } [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#complete-liquidity-lifecycle) Complete Liquidity Lifecycle --------------------------------------------------------------------------------------------------------------------------- Copy Ask AI async function completeLiquidityLifecycle() { const poolId = "pool-id"; // 1. Add liquidity console.log('=== Adding Liquidity ==='); const addResponse = await client.addLiquidity({ poolId: poolId, assetAAmount: 100000000n, // 1 BTC assetBAmount: 100000000000n, // 100,000 USDB }); const initialInvestment = { assetA: 100000000n, assetB: 100000000000n, }; // 2. Monitor position over time console.log('\n=== Monitoring Position ==='); await new Promise(resolve => setTimeout(resolve, 60000)); // Wait 1 minute await trackPosition(poolId); // 3. Calculate returns console.log('\n=== Calculating Returns ==='); await calculateReturns(poolId); // 4. Remove 50% of liquidity console.log('\n=== Removing 50% Liquidity ==='); await removePartialLiquidity(poolId, 50); // 5. Check remaining position console.log('\n=== Remaining Position ==='); await trackPosition(poolId); } [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#error-handling) Error Handling ----------------------------------------------------------------------------------------------- Copy Ask AI async function safeAddLiquidity(poolId: string, assetAAmount: bigint, assetBAmount: bigint) { try { // Check balances first const balance = await client.getBalance(); // Validate sufficient balance const pool = await client.getPool(poolId); const BTC_PUBKEY = "020202020202020202020202020202020202020202020202020202020202020202"; const btcRequired = pool.assetAAddress === BTC_PUBKEY ? assetAAmount : pool.assetBAddress === BTC_PUBKEY ? assetBAmount : 0n; if (balance.balance < btcRequired) { throw new Error('Insufficient BTC balance'); } // Add liquidity return await client.addLiquidity({ poolId: poolId, assetAAmount: assetAAmount, assetBAmount: assetBAmount, }); } catch (error) { if (error.message.includes('Insufficient balance')) { console.error('Not enough funds'); } else if (error.message.includes('Pool inactive')) { console.error('Pool is currently inactive'); } else if (error.message.includes('Below minimum')) { console.error('Amount below minimum requirement'); } else { console.error('Operation failed:', error); } throw error; } } [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#best-practices) Best Practices ----------------------------------------------------------------------------------------------- 1. **Always simulate first**: Check expected outcomes before executing 2. **Track impermanent loss**: Understand the risks of providing liquidity 3. **Regular monitoring**: Check your position and fees periodically [​](https://docs.flashnet.xyz/products/flashnet-amm/liquidity#next-steps) Next Steps --------------------------------------------------------------------------------------- * [Create new pools](https://docs.flashnet.xyz/products/flashnet-amm/creation) to earn from the start * [Execute swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) to generate fees * [Become a host](https://docs.flashnet.xyz/products/flashnet-amm/hosts) to earn additional fees Was this page helpful? YesNo [Pool Creation\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/creation) [Swaps\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/swaps) ⌘I --- # Hosts - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/hosts#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Quick Start Hosts [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Registration](https://docs.flashnet.xyz/products/flashnet-amm/hosts#registration) * [Requirements](https://docs.flashnet.xyz/products/flashnet-amm/hosts#requirements) * [Fee Structure](https://docs.flashnet.xyz/products/flashnet-amm/hosts#fee-structure) * [Implementation](https://docs.flashnet.xyz/products/flashnet-amm/hosts#implementation) * [Fee Management](https://docs.flashnet.xyz/products/flashnet-amm/hosts#fee-management) * [Host Discovery](https://docs.flashnet.xyz/products/flashnet-amm/hosts#host-discovery) Hosts in the Flashnet AMM are integrators who register to earn fees from trading activity. They can be exchanges, wallet providers, dApps, or any application looking to leverage Bitcoin liquidity while earning revenue. The Flashnet Gateway enables fee sharing with registered hosts through: * **Namespace Attribution**: Pools tagged with your unique identifier * **Fee Routing**: Automatic distribution of trading fees * **White Label Branding**: Pools appear as “\[Host Name\]” pools * **Revenue Generation**: Earn from every swap in your pools [​](https://docs.flashnet.xyz/products/flashnet-amm/hosts#registration) Registration --------------------------------------------------------------------------------------- ### [​](https://docs.flashnet.xyz/products/flashnet-amm/hosts#requirements) Requirements * **Namespace**: 3-32 characters, globally unique, alphanumeric with hyphens * **Minimum Fee**: Configure your minimum acceptable fee (10-100 BPS) * **Public Key**: Must be a valid secp256k1 public key * **Authentication**: Performed automatically via the SDK using your wallet’s identity key ### [​](https://docs.flashnet.xyz/products/flashnet-amm/hosts#fee-structure) Fee Structure See the dedicated [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) page for complete details on LP, host, and integrator fees, accrual, and withdrawals. Key points for hosts: * Set `minFeeBps` during registration; pools using your namespace must set `totalHostFeeRateBps >= minFeeBps`. * Fees accrue and are withdrawn in Asset B only. ### [​](https://docs.flashnet.xyz/products/flashnet-amm/hosts#implementation) Implementation Before registering as a host, make sure you have [set up the Flashnet SDK client](https://docs.flashnet.xyz/products/flashnet-amm/setup) . Copy Ask AI // Register as a host async function registerAsHost() { try { const response = await client.registerHost({ namespace: "my-exchange", minFeeBps: 50, // Minimum 0.5% fee feeRecipientPublicKey: "optional-different-pubkey" // Optional: defaults to wallet's public key }); console.log('Registration successful:', response); } catch (error) { console.error('Registration failed:', error); } } **Security Requirements:** * The request is automatically signed with your wallet’s private key * Each request includes a unique nonce to prevent replay attacks * The namespace must be globally unique [​](https://docs.flashnet.xyz/products/flashnet-amm/hosts#fee-management) Fee Management ------------------------------------------------------------------------------------------- Refer to [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) for accrual and withdrawal APIs and examples. [​](https://docs.flashnet.xyz/products/flashnet-amm/hosts#host-discovery) Host Discovery ------------------------------------------------------------------------------------------- Query registered hosts and their pools using the SDK: Copy Ask AI // Get host information by namespace async function getHostInfo(namespace: string) { try { const hostInfo = await client.getHost(namespace); console.log('Host info:', hostInfo); } catch (error) { console.error('Failed to fetch host information:', error); } } // Get pool host fees async function checkPoolFees(hostNamespace: string, poolId: string) { try { const fees = await client.getPoolHostFees(hostNamespace, poolId); console.log('Available fees:', fees); } catch (error) { console.error('Failed to fetch pool fees:', error); } } // Filter pools by host async function getPoolsByHost(hostNames: string[]) { try { const pools = await client.listPools({ hostNames, }); console.log('Host pools:', pools); } catch (error) { console.error('Failed to fetch pools:', error); } } **Response includes:** * Unique namespace identifier * Minimum fee configuration (`minFeeBps`) * Fee recipient public key * Flashnet split percentage * Registration timestamp Was this page helpful? YesNo [Fees\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/fees) [Advanced Topics\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ⌘I --- # Fees - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/fees#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Quick Start Fees [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Fee Types](https://docs.flashnet.xyz/products/flashnet-amm/fees#fee-types) * [Configuration](https://docs.flashnet.xyz/products/flashnet-amm/fees#configuration) * [Accrual](https://docs.flashnet.xyz/products/flashnet-amm/fees#accrual) * [Querying Accrued Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees#querying-accrued-fees) * [Withdrawing Fees (Asset B Only)](https://docs.flashnet.xyz/products/flashnet-amm/fees#withdrawing-fees-asset-b-only) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/fees#hosts) * [Integrators](https://docs.flashnet.xyz/products/flashnet-amm/fees#integrators) * [Best Practices](https://docs.flashnet.xyz/products/flashnet-amm/fees#best-practices) * [Related](https://docs.flashnet.xyz/products/flashnet-amm/fees#related) Trading fees are distributed to liquidity providers and optionally to registered hosts and integrators. This page explains fee types, how they accrue, and how to withdraw them via the SDK. [​](https://docs.flashnet.xyz/products/flashnet-amm/fees#fee-types) Fee Types -------------------------------------------------------------------------------- * **LP Fee**: Paid by traders to liquidity providers in the asset being swapped **in**. * **Host Fee**: Optional fee paid in **Asset B** when a pool is created with a `hostNamespace`. * **Integrator Fee**: Optional fee charged at swap time by integrators, paid in **Asset B**. All fees for hosts and integrators are assessed and accrued strictly in Asset B of the pool. LP fees are accrued in the asset that the trader provides for the swap. Withdrawals for hosts and integrators are also only in Asset B. [​](https://docs.flashnet.xyz/products/flashnet-amm/fees#configuration) Configuration ---------------------------------------------------------------------------------------- * **LP Fee**: Set per pool via `lpFeeRateBps`. * **Host Fee**: Set per pool via `totalHostFeeRateBps` when using a `hostNamespace`. * Hosts register a `minFeeBps`; pools using that namespace must set `totalHostFeeRateBps >= minFeeBps`. * Default split of host fees: Flashnet 60%, Host 40%. * **Integrator Fee**: Set per swap via `integratorFeeRateBps` and optional `integratorPublicKey`. * Sharing rule: if `integratorFeeRateBps` ≤ 30 BPS, 0% is shared with Flashnet; above 30 BPS, 30% of the integrator fee is shared with Flashnet. [​](https://docs.flashnet.xyz/products/flashnet-amm/fees#accrual) Accrual ---------------------------------------------------------------------------- * **Per Trade**: Fees are computed and accrued on each swap. * **Asset B Only**: Fees accrue only in Asset B. * **Real-Time Updates**: Accruals update immediately with executions. ### [​](https://docs.flashnet.xyz/products/flashnet-amm/fees#querying-accrued-fees) Querying Accrued Fees Copy Ask AI // Host fees for a specific pool async function getPoolHostFees(hostNamespace: string, poolId: string) { const fees = await client.getPoolHostFees(hostNamespace, poolId); console.log('Pool host fees (Asset B):', fees); } // Host fees across all pools async function getHostFees(hostNamespace: string) { const fees = await client.getHostFees(hostNamespace); console.log('Aggregate host fees (Asset B):', fees); } // Integrator fees across all pools async function getIntegratorFees() { const fees = await client.getIntegratorFees(); console.log('Integrator fees (Asset B):', fees); } [​](https://docs.flashnet.xyz/products/flashnet-amm/fees#withdrawing-fees-asset-b-only) Withdrawing Fees (Asset B Only) -------------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.flashnet.xyz/products/flashnet-amm/fees#hosts) Hosts Copy Ask AI // Withdraw all available host fees (Asset B) from a pool async function withdrawAllHostFees(poolId: string) { const res = await client.withdrawHostFees({ lpIdentityPublicKey: poolId, }); console.log('Host withdrawal:', res); } // Withdraw a specific amount of Asset B host fees async function withdrawPartialHostFees(poolId: string) { const res = await client.withdrawHostFees({ lpIdentityPublicKey: poolId, assetBAmount: '500000', // example amount in Asset B units }); console.log('Partial host withdrawal:', res); } ### [​](https://docs.flashnet.xyz/products/flashnet-amm/fees#integrators) Integrators Copy Ask AI // Withdraw all available integrator fees (Asset B) from a pool async function withdrawAllIntegratorFees(poolId: string) { const res = await client.withdrawIntegratorFees({ lpIdentityPublicKey: poolId, }); console.log('Integrator withdrawal:', res); } // Withdraw a specific amount of Asset B integrator fees async function withdrawPartialIntegratorFees(poolId: string) { const res = await client.withdrawIntegratorFees({ lpIdentityPublicKey: poolId, assetBAmount: '250000', }); console.log('Partial integrator withdrawal:', res); } [​](https://docs.flashnet.xyz/products/flashnet-amm/fees#best-practices) Best Practices ------------------------------------------------------------------------------------------ 1. **Surface net amounts** in your UI: amounts shown in simulations and executions are already post‑fee. 2. **Host compliance**: Ensure `totalHostFeeRateBps` meets the host’s `minFeeBps` when using a namespace. 3. **Integrator fee disclosure**: Display `integratorFeeRateBps` transparently to users. [​](https://docs.flashnet.xyz/products/flashnet-amm/fees#related) Related ---------------------------------------------------------------------------- * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) Was this page helpful? YesNo [Swap History\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/history) [Hosts\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/hosts) ⌘I --- # Swap History - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/history#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Quick Start Swap History [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Get Global Swaps](https://docs.flashnet.xyz/products/flashnet-amm/history#get-global-swaps) * [Get Pool Swaps](https://docs.flashnet.xyz/products/flashnet-amm/history#get-pool-swaps) * [Get User Swaps](https://docs.flashnet.xyz/products/flashnet-amm/history#get-user-swaps) * [Filtering and Pagination](https://docs.flashnet.xyz/products/flashnet-amm/history#filtering-and-pagination) * [Next Steps](https://docs.flashnet.xyz/products/flashnet-amm/history#next-steps) The Flashnet SDK provides methods to query historical swap data, allowing you to track trading activity across the AMM, for specific pools, or for individual users. [​](https://docs.flashnet.xyz/products/flashnet-amm/history#get-global-swaps) Get Global Swaps ------------------------------------------------------------------------------------------------- Retrieve a list of the latest swaps across all pools on the AMM. Copy Ask AI async function getGlobalSwaps() { try { const history = await client.getGlobalSwaps({ limit: 50, // }); console.log(`Found ${history.totalCount} swaps globally.`); history.swaps.forEach(swap => { console.log(`- Pool ${swap.poolLpPublicKey}: ${swap.amountIn} -> ${swap.amountOut}`); }); return history; } catch (error) { console.error('Failed to get global swaps:', error); } } [​](https://docs.flashnet.xyz/products/flashnet-amm/history#get-pool-swaps) Get Pool Swaps --------------------------------------------------------------------------------------------- Fetch the swap history for a single, specific pool. Copy Ask AI async function getPoolSwaps(poolId: string) { try { const history = await client.getPoolSwaps(poolId, { limit: 100, startTime: new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString(), // Last 24 hours }); console.log(`Found ${history.totalCount} swaps for pool ${poolId}.`); history.swaps.forEach(swap => { console.log(`- User ${swap.swapperPublicKey} swapped ${swap.amountIn} for ${swap.amountOut}`); }); } catch (error) { console.error(`Failed to get swaps for pool ${poolId}:`, error); } } [​](https://docs.flashnet.xyz/products/flashnet-amm/history#get-user-swaps) Get User Swaps --------------------------------------------------------------------------------------------- Retrieve the trading history for a specific user. If no user public key is provided, it defaults to the client’s wallet public key. Copy Ask AI async function getMySwapHistory() { try { // Gets history for the client's own wallet const history = await client.getUserSwaps(); console.log('My swap history:', history.swaps); } catch (error) { console.error('Failed to get my swap history:', error); } } async function getAnyUserSwapHistory(userPublicKey: string) { try { const history = await client.getUserSwaps(userPublicKey, { limit: 50, sort: "timestampDesc", }); console.log(`History for ${userPublicKey}:`, history.swaps); } catch(error) { console.error('Failed to get user swap history:', error); } } [​](https://docs.flashnet.xyz/products/flashnet-amm/history#filtering-and-pagination) Filtering and Pagination ----------------------------------------------------------------------------------------------------------------- All history methods support `limit` and `offset` for pagination, as well as other filters like `startTime` and `endTime`. Refer to the `ListPoolSwapsQuery`, `ListGlobalSwapsQuery`, and `ListUserSwapsQuery` types in `src/types/index.ts` for a full list of available filters. [​](https://docs.flashnet.xyz/products/flashnet-amm/history#next-steps) Next Steps ------------------------------------------------------------------------------------- * [Execute Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Explore Pools](https://docs.flashnet.xyz/products/flashnet-amm/creation) Was this page helpful? YesNo [Querying Pools\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/pools) [Fees\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/fees) ⌘I --- # Querying Pools - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/pools#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Quick Start Querying Pools [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Listing Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools#listing-pools) * [Filtering and Sorting](https://docs.flashnet.xyz/products/flashnet-amm/pools#filtering-and-sorting) * [Example: Finding Specific Pairs](https://docs.flashnet.xyz/products/flashnet-amm/pools#example%3A-finding-specific-pairs) * [Getting Pool Details](https://docs.flashnet.xyz/products/flashnet-amm/pools#getting-pool-details) * [Understanding Market Data](https://docs.flashnet.xyz/products/flashnet-amm/pools#understanding-market-data) The Flashnet SDK allows you to discover active liquidity pools and retrieve detailed market data for them. You can list all available pools with powerful filtering and sorting options, or query for the specific details of a single pool. [​](https://docs.flashnet.xyz/products/flashnet-amm/pools#listing-pools) Listing Pools ----------------------------------------------------------------------------------------- The `listPools` method is the primary way to discover pools. You can use it without any parameters to get a list of all pools, or provide a query object to filter and sort the results. Copy Ask AI async function discoverPools() { try { const response = await client.listPools({ minTvl: 10000, // Minimum TVL of $10,000 (if Asset B is a stablecoin) sort: "VOLUME24H_DESC", // Show most active pools first limit: 20, }); console.log(`Found ${response.totalCount} pools meeting the criteria.`); response.pools.forEach(pool => { console.log(`- Pool ${pool.lpPublicKey}: TVL = ${pool.tvlAssetB}, Volume (24h) = ${pool.volume24hAssetB}`); }); } catch (error) { console.error('Failed to list pools:', error); } } ### [​](https://docs.flashnet.xyz/products/flashnet-amm/pools#filtering-and-sorting) Filtering and Sorting The `listPools` method accepts a `ListPoolsQuery` object with the following options: | Parameter | Type | Description | | --- | --- | --- | | `assetAAddress` | `string` | Filter by the address of Asset A. | | `assetBAddress` | `string` | Filter by the address of Asset B. | | `hostNames` | `string[]` | Filter by one or more host namespaces. | | `minVolume24h` | `number` | Only include pools with 24-hour volume above this value. | | `minTvl` | `number` | Only include pools with TVL above this value. | | `curveTypes` | `string[]` | Filter by curve type (e.g., `["CONSTANT_PRODUCT"]`). | | `sort` | `PoolSortOrder` | Sort results by `TVL`, `VOLUME24H`, or `CREATED_AT`. | | `limit` | `number` | The maximum number of pools to return. | | `offset` | `number` | The number of pools to skip for pagination. | | `afterUpdatedAt` | `string` | RFC3339 timestamp to get pools updated after a date. | ### [​](https://docs.flashnet.xyz/products/flashnet-amm/pools#example%3A-finding-specific-pairs) Example: Finding Specific Pairs Copy Ask AI async function findBtcUsdbPools() { const pools = await client.listPools({ assetAAddress: "bitcoin-pubkey", assetBAddress: "usdb-pubkey", sort: "TVL_DESC", }); console.log('Found BTC/USDB pools by TVL:', pools); } [​](https://docs.flashnet.xyz/products/flashnet-amm/pools#getting-pool-details) Getting Pool Details ------------------------------------------------------------------------------------------------------- To get all available information for a single pool, use the `getPool` method with the pool’s ID (its `lpPublicKey`). Copy Ask AI async function getPoolDetails(poolId: string) { try { const pool = await client.getPool(poolId); console.log('Pool Details:', pool); console.log(`- TVL: ${pool.tvlAssetB}`); console.log(`- 24h Volume: ${pool.volume24hAssetB}`); console.log(`- 24h Price Change: ${pool.priceChangePercent24h}%`); console.log(`- Current Price: ${pool.currentPriceAInB}`); } catch (error) { console.error('Failed to get pool details:', error); } } [​](https://docs.flashnet.xyz/products/flashnet-amm/pools#understanding-market-data) Understanding Market Data ----------------------------------------------------------------------------------------------------------------- The pool objects returned by the SDK contain valuable market data. Some fields are common to all pool types, while others are specific to either constant product or single-sided bonding curve pools. | Field | Applies To | Description | | --- | --- | --- | | `lpPublicKey` | Both | The unique identifier (public key) for the liquidity pool. This is used as the `poolId`. | | `hostName` | Both | The namespace of the host that created the pool, if any. | | `hostFeeBps` | Both | The host fee rate in basis points (e.g., 100 BPS = 1%). | | `lpFeeBps` | Both | The liquidity provider fee rate in basis points (e.g., 30 BPS = 0.3%). | | `assetAAddress` | Both | The public key (address) of the first asset in the pair. | | `assetBAddress` | Both | The public key (address) of the second asset in the pair. | | `assetAReserve` | Both | The current amount of Asset A held in the pool’s reserves. | | `assetBReserve` | Both | The current amount of Asset B held in the pool’s reserves. | | `tvlAssetB` | Both | Total Value Locked, denominated in Asset B. This is a key measure of a pool’s liquidity. | | `volume24hAssetB` | Both | The total value of assets swapped in the pool over the last 24 hours, denominated in Asset B. | | `priceChangePercent24h` | Both | The percentage change in the price of Asset A relative to Asset B over the last 24 hours. | | `currentPriceAInB` | Both | The current spot price of Asset A in terms of Asset B, calculated from the pool’s reserves. | | `curveType` | Both | The type of pool: `CONSTANT_PRODUCT` or `SINGLE_SIDED`. | | `createdAt` | Both | The timestamp when the pool was created. | | `updatedAt` | Both | The timestamp of the last event (e.g., swap, liquidity change) that updated the pool’s state. | | `virtualReserveA` | Single-Sided | The virtual reserve of Asset A used for price calculations along the bonding curve. | | `virtualReserveB` | Single-Sided | The virtual reserve of Asset B used for price calculations along the bonding curve. | | `initialReserveA` | Single-Sided | The initial amount of Asset A deposited by the creator to start the bonding curve. | | `graduationThresholdAmount` | Single-Sided | The absolute amount of Asset A that must be sold for the pool to “graduate” to a constant product pool. | | `bondingProgressPercent` | Single-Sided | The percentage of the `graduationThresholdAmount` that has been met so far. | | `thresholdPct` | Single-Sided | The graduation threshold expressed as a percentage of the `initialReserveA`. | Was this page helpful? YesNo [Route Swaps\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) [Swap History\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/history) ⌘I --- # Advanced Topics - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/advanced#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Quick Start Advanced Topics [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Clawback](https://docs.flashnet.xyz/products/flashnet-amm/advanced#clawback) * [When to Use Clawback](https://docs.flashnet.xyz/products/flashnet-amm/advanced#when-to-use-clawback) * [How it Works](https://docs.flashnet.xyz/products/flashnet-amm/advanced#how-it-works) * [Implementation](https://docs.flashnet.xyz/products/flashnet-amm/advanced#implementation) This section covers advanced or less common features of the Flashnet AMM SDK that can be useful in specific scenarios. [​](https://docs.flashnet.xyz/products/flashnet-amm/advanced#clawback) Clawback ---------------------------------------------------------------------------------- The `clawback` function is a recovery mechanism for users who have sent funds to an AMM pool for an operation (like a swap or liquidity addition) that never completed. If a user’s inbound transfer gets “stuck,” this function allows them to request a refund from the AMM validators. ### [​](https://docs.flashnet.xyz/products/flashnet-amm/advanced#when-to-use-clawback) When to Use Clawback You should only use the `clawback` function after an operation has failed and you have a `sparkTransferId` for a transfer that was sent to an LP wallet but was not processed. This is an exceptional recovery tool and should not be part of a normal application flow. ### [​](https://docs.flashnet.xyz/products/flashnet-amm/advanced#how-it-works) How it Works The user signs an intent asserting ownership of the stuck transfer. The AMM validators verify that the transfer was indeed never used in a successful operation and then refund the assets to the original sender. ### [​](https://docs.flashnet.xyz/products/flashnet-amm/advanced#implementation) Implementation Copy Ask AI async function requestClawback(stuckTransferId: string, poolId: string) { try { const response = await client.clawback({ sparkTransferId: stuckTransferId, lpIdentityPublicKey: poolId, }); if (response.accepted) { console.log('Clawback request accepted.'); console.log('Track status with internalRequestId:', response.internalRequestId); } else { console.error('Clawback request rejected:', response.error); } } catch (error) { console.error('Failed to request clawback:', error); } } To use this function, you need: * The `sparkTransferId` of the original, stuck transfer. * The `lpIdentityPublicKey` (the pool ID) to which the funds were sent. The wallet used to initialize the `client` must be the one that originally sent the funds. Was this page helpful? YesNo [Hosts\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/hosts) [How it works\ \ Next](https://docs.flashnet.xyz/products/flashnet-rfq/overview) ⌘I --- # Route Swaps - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Quick Start Route Swaps [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Simulating a Route Swap](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps#simulating-a-route-swap) * [Executing a Route Swap](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps#executing-a-route-swap) * [Integrator Fees](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps#integrator-fees) * [Next Steps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps#next-steps) Route swaps (or multi-hop swaps) allow you to trade between two assets by routing the transaction through one or more intermediary pools. This is useful when there’s no direct liquidity pool for a specific asset pair but a path exists through other pools. The Flashnet SDK simplifies this process by allowing you to define a series of “hops” that make up the desired route. The maximum number of hops allowed in a single route swap is 4. [​](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps#simulating-a-route-swap) Simulating a Route Swap ------------------------------------------------------------------------------------------------------------------- Before executing, it’s crucial to simulate the route swap to get an estimate of the expected output, price impact, and fees. Copy Ask AI async function simulateRouteSwap() { try { const simulation = await client.simulateRouteSwap({ hops: [\ {\ poolId: "btc-usdb-pool-id",\ assetInAddress: "bitcoin-pubkey",\ assetOutAddress: "usdb-pubkey",\ },\ {\ poolId: "usdb-eur-pool-id",\ assetInAddress: "usdb-pubkey",\ assetOutAddress: "eur-pubkey",\ },\ ], amountIn: "10000000", // 0.1 BTC maxRouteSlippageBps: "100", // 1% }); console.log('Expected final output amount:', simulation.outputAmount); console.log('Total price impact %:', simulation.totalPriceImpactPct); console.log('Hop breakdown:', simulation.hopBreakdown); return simulation; } catch (error) { console.error('Route swap simulation failed:', error); } } The simulation provides a breakdown for each hop, allowing you to see how the swap progresses at each stage. [​](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps#executing-a-route-swap) Executing a Route Swap ----------------------------------------------------------------------------------------------------------------- To execute the swap, you provide the same hop structure along with slippage parameters. The SDK handles the transfer to the first pool and the subsequent routing automatically. Copy Ask AI async function executeRouteSwap() { try { // First, simulate to get an expected output const simulation = await client.simulateRouteSwap({ hops: [\ { poolId: "btc-usdb-pool-id", assetInAddress: "bitcoin-pubkey", assetOutAddress: "usdb-pubkey" },\ { poolId: "usdb-eur-pool-id", assetInAddress: "usdb-pubkey", assetOutAddress: "eur-pubkey" },\ ], amountIn: "10000000", // 0.1 BTC maxRouteSlippageBps: "100", }); if (!simulation) { throw new Error("Simulation failed, cannot execute."); } // Set a minimum amount out based on simulation to protect against slippage const minAmountOut = (BigInt(simulation.outputAmount) * 99n / 100n).toString(); // 1% tolerance const response = await client.executeRouteSwap({ hops: [\ {\ poolId: "btc-usdb-pool-id",\ assetInAddress: "bitcoin-pubkey",\ assetOutAddress: "usdb-pubkey",\ },\ {\ poolId: "usdb-eur-pool-id",\ assetInAddress: "usdb-pubkey",\ assetOutAddress: "eur-pubkey",\ },\ ], initialAssetAddress: "bitcoin-pubkey", inputAmount: "10000000", maxRouteSlippageBps: "100", // 1% minAmountOut: minAmountOut, }); console.log('Route swap successful!'); console.log('Final amount out:', response.outputAmount); console.log('Final transfer ID:', response.finalOutboundTransferId); } catch (error) { console.error('Route swap execution failed:', error); } } ### [​](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps#integrator-fees) Integrator Fees You can also specify integrator fees for the entire route or for individual hops. Copy Ask AI async function executeRouteSwapWithFees() { const minAmountOut = "950000"; // calculated from simulation await client.executeRouteSwap({ hops: [\ {\ poolId: "btc-usdb-pool-id",\ assetInAddress: "bitcoin-pubkey",\ assetOutAddress: "usdb-pubkey",\ hopIntegratorFeeRateBps: 20, // 0.2% fee for this specific hop\ },\ {\ poolId: "usdb-eur-pool-id",\ assetInAddress: "usdb-pubkey",\ assetOutAddress: "eur-pubkey",\ },\ ], initialAssetAddress: "bitcoin-pubkey", inputAmount: "10000000", maxRouteSlippageBps: "100", minAmountOut: minAmountOut, integratorFeeRateBps: 10, // 0.1% fee for any hop that doesn't have a specific fee integratorPublicKey: "your-integrator-pubkey", }); } [​](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps#next-steps) Next Steps ----------------------------------------------------------------------------------------- * [Learn about single-pool swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Provide liquidity to earn fees](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) Was this page helpful? YesNo [Swaps\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/swaps) [Querying Pools\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/pools) ⌘I --- # Swaps - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-amm/swaps#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Quick Start Swaps [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade close On this page * [Simulating a Swap](https://docs.flashnet.xyz/products/flashnet-amm/swaps#simulating-a-swap) * [Executing a Swap](https://docs.flashnet.xyz/products/flashnet-amm/swaps#executing-a-swap) * [Advanced Swap Examples](https://docs.flashnet.xyz/products/flashnet-amm/swaps#advanced-swap-examples) * [Token-to-Token Swap](https://docs.flashnet.xyz/products/flashnet-amm/swaps#token-to-token-swap) * [Bitcoin-to-Token Swap](https://docs.flashnet.xyz/products/flashnet-amm/swaps#bitcoin-to-token-swap) * [Swap with Price Checks](https://docs.flashnet.xyz/products/flashnet-amm/swaps#swap-with-price-checks) * [Error Handling](https://docs.flashnet.xyz/products/flashnet-amm/swaps#error-handling) * [Next Steps](https://docs.flashnet.xyz/products/flashnet-amm/swaps#next-steps) Swaps enable users to instantly trade between assets in a pool. Users can use the SDK to both simulate the outcome of a swap before executing it, and to execute the swap. [​](https://docs.flashnet.xyz/products/flashnet-amm/swaps#simulating-a-swap) Simulating a Swap ------------------------------------------------------------------------------------------------- Always simulate a swap before executing to check the expected output and slippage: Copy Ask AI async function simulateSwap() { try { const simulation = await client.simulateSwap({ poolId: "pool-public-key", assetInAddress: "bitcoin-pubkey", assetOutAddress: "usdb-pubkey", amountIn: "100000000", // 1 BTC in satoshis }); console.log('Expected output:', simulation.amountOut); console.log('Execution price:', simulation.executionPrice); console.log('Price impact %:', simulation.priceImpactPct); return simulation; } catch (error) { console.error('Simulation failed:', error); } } [​](https://docs.flashnet.xyz/products/flashnet-amm/swaps#executing-a-swap) Executing a Swap ----------------------------------------------------------------------------------------------- After simulating, execute the swap with slippage protection: Copy Ask AI async function executeSwap() { try { // First simulate to get expected output const simulation = await client.simulateSwap({ poolId: "pool-public-key", assetInAddress: "bitcoin-pubkey", assetOutAddress: "usdb-pubkey", amountIn: "100000000", // 1 BTC }); // Calculate minimum output with slippage tolerance const minAmountOut = BigInt(simulation.amountOut) * 99n / 100n; // 1% slippage // Execute the swap const swap = await client.executeSwap({ poolId: "pool-public-key", assetInAddress: "bitcoin-pubkey", assetOutAddress: "usdb-pubkey", amountIn: "100000000", // 1 BTC minAmountOut: minAmountOut.toString(), maxSlippageBps: 100, // 1% max slippage }); console.log('Swap successful!'); console.log('Amount out:', swap.amountOut); console.log('Outbound transfer:', swap.outboundTransferId); return swap; } catch (error) { console.error('Swap failed:', error); } } [​](https://docs.flashnet.xyz/products/flashnet-amm/swaps#advanced-swap-examples) Advanced Swap Examples ----------------------------------------------------------------------------------------------------------- Note on integrator fees: * If you set `integratorFeeRateBps` up to 30 BPS, none of the integrator fee is shared with Flashnet * If you set `integratorFeeRateBps` above 30 BPS, 30% of the integrator fee is shared with Flashnet All host and integrator fees are assessed and distributed in Asset B only. Displayed `amountOut` values from the API are post‑fee. ### [​](https://docs.flashnet.xyz/products/flashnet-amm/swaps#token-to-token-swap) Token-to-Token Swap Copy Ask AI async function swapTokenToToken() { const swap = await client.executeSwap({ poolId: "pool-id", assetInAddress: "token-a-pubkey", assetOutAddress: "token-b-pubkey", amountIn: "1000000", // Amount in token A's smallest units minAmountOut: "950000", // Minimum acceptable output maxSlippageBps: 50, // 0.5% max slippage }); console.log('Swapped', swap.amountIn, 'for', swap.amountOut); } ### [​](https://docs.flashnet.xyz/products/flashnet-amm/swaps#bitcoin-to-token-swap) Bitcoin-to-Token Swap Copy Ask AI async function swapBTCToToken() { const BTC_PUBKEY = "020202020202020202020202020202020202020202020202020202020202020202"; const swap = await client.executeSwap({ poolId: "pool-id", assetInAddress: BTC_PUBKEY, assetOutAddress: "usdb-pubkey", amountIn: "10000000", // 0.1 BTC in satoshis minAmountOut: "9900000000", // Minimum 99,000 USDB (with 6 decimals) maxSlippageBps: 100, // 1% max slippage }); console.log('Swapped BTC for USDB:', swap); } [​](https://docs.flashnet.xyz/products/flashnet-amm/swaps#swap-with-price-checks) Swap with Price Checks ----------------------------------------------------------------------------------------------------------- Copy Ask AI async function swapWithPriceValidation() { const poolId = "pool-id"; const amountIn = 100000000n; // 1 BTC // Get current pool state const pool = await client.getPool(poolId); // Calculate spot price const spotPrice = Number(pool.assetBReserve) / Number(pool.assetAReserve); console.log('Current spot price:', spotPrice); // Simulate swap const simulation = await client.simulateSwap({ poolId: poolId, assetInAddress: pool.assetAAddress, assetOutAddress: pool.assetBAddress, amountIn: amountIn.toString(), }); // Calculate effective price const effectivePrice = Number(simulation.amountOut) / Number(amountIn); const priceImpact = ((spotPrice - effectivePrice) / spotPrice) * 100; console.log('Effective price:', effectivePrice); console.log('Price impact:', priceImpact.toFixed(2), '%'); // Only proceed if price impact is acceptable if (priceImpact < 2) { // Less than 2% impact const swap = await client.executeSwap({ poolId: poolId, assetInAddress: pool.assetAAddress, assetOutAddress: pool.assetBAddress, amountIn: amountIn.toString(), minAmountOut: (BigInt(simulation.amountOut) * 98n / 100n).toString(), // 2% slippage maxSlippageBps: 200, }); console.log('Swap executed:', swap); } else { console.log('Price impact too high, swap cancelled'); } } [​](https://docs.flashnet.xyz/products/flashnet-amm/swaps#error-handling) Error Handling ------------------------------------------------------------------------------------------- Copy Ask AI async function swapWithErrorHandling() { try { const swap = await client.executeSwap({ poolId: "pool-id", assetInAddress: "bitcoin-pubkey", assetOutAddress: "usdb-pubkey", amountIn: "100000000", minAmountOut: "99000000000", maxSlippageBps: 100, }); console.log('Success:', swap); } catch (error) { if (error.message.includes('Insufficient balance')) { console.error('Not enough funds to execute swap'); } else if (error.message.includes('Slippage exceeded')) { console.error('Price moved too much during execution'); } else if (error.message.includes('Pool inactive')) { console.error('Pool is currently inactive'); } else { console.error('Swap failed:', error); } } } [​](https://docs.flashnet.xyz/products/flashnet-amm/swaps#next-steps) Next Steps ----------------------------------------------------------------------------------- * [Add liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) to earn fees from swaps * [Remove liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) to withdraw your funds * Monitor swap analytics and pool performance Was this page helpful? YesNo [Liquidity\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) [Route Swaps\ \ Next](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) ⌘I --- # How it works - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-trade/overview#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Flashnet Trade How it works [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade * [How it works](https://docs.flashnet.xyz/products/flashnet-trade/overview) * [Trading Fees](https://docs.flashnet.xyz/products/flashnet-trade/fees) * [Vaults](https://docs.flashnet.xyz/products/flashnet-vaults) * Trading Platform * [Trust Model](https://docs.flashnet.xyz/products/flashnet-trade/trust-model) close On this page * [Trading process](https://docs.flashnet.xyz/products/flashnet-trade/overview#trading-process) * [Behind the design](https://docs.flashnet.xyz/products/flashnet-trade/overview#behind-the-design) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/clob-light.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=a8a655536e1b3a78de097046ee5946d6) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/clob-dark.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=eeed9ef9ae164ec9dcdb7209c8fe219e) Flashnet Trade enables native Bitcoin trading by merging an off-chain, intent-based matching engine with native L1 settlement via [Spark](https://docs.spark.info/spark/spark-tldr) . This hybrid approach delivers instant order matching and secure, non-custodial guarantees. Users can sequence their balance at any moment back to L1, without any permission. ### [​](https://docs.flashnet.xyz/products/flashnet-trade/overview#trading-process) Trading process Flashnet Trade is powered by a high performance CLOB for hyper-efficient liquidity provision and off-chain order matching. Flashnet’s distributed validator network ensures the matching engine fairness and execution, whilst Spark’s validator network ensures the trade finality and settlement. **1\. Delegated Trading Wallet Creation** ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/wallet-light.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=f7319a77e118328982200c6c8cf03b93) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/wallet-dark.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=ca6cf03a99bb2e09fe19ea8ee69beaff) To trade, a user first collaborates with validators to establish a threshold wallet via a shared key generation process. * Control is split: the user and validators each hold a shard of the wallet, and a predefined threshold of shards must sign to authorize actions. * The user designates a unilateral exit address, enabling fund recovery via this L1 address as an escape hatch. Validators only sign on valid user intents, with their logic executed in a Trusted Execution Environment (TEE). **2\. Placing an Order** * Let’s say the user wants to make a limit order to buy 1 BTC for 100,000 USD. First, they approve 100,000 USD from their self-custody wallet to the trading wallet. Then, they create a signed order intent, including cryptographic proof of fund approval, and submit it to the off-chain CLOB. * Orders can be canceled by revoking approval before matching, requiring no external interaction and atomically cancelling the order. **3\. Matching Orders** * The CLOB verifies the wallet’s fund approval and the intent’s signature. If valid, it attempts to match the order—e.g., pairing a buy at 100,000 USD per BTC with a sell at the same price or better. * Upon matching, it generates a proof of match, bundling both parties’ signed intents and trade details. If not matched, depending on the order type, the order will either sit in the order book until matched or be canceled. * Funds remain in the user’s self-custody wallet until the order is matched. **4\. Settling Trades** * The proof of match goes to the validators, who independently verify it. Once confirmed, they collectively sign the match details and wallet instructions using the threshold signature scheme, triggering an atomic swap via Spark where the funds are settled. * Partial fills are settled proportionally, leaving remaining funds available. ### [​](https://docs.flashnet.xyz/products/flashnet-trade/overview#behind-the-design) Behind the design This system intentionally divorces the matching and settlement processes and validation into two dinstinct layers for performance and security. Off-chain intent-based matching ensures fast order processing and execution without any consensus latency. The threshold signature model eliminates single points of failure for settlement validation, as no individual validator or party can unilaterally control the funds except for the user. The unilateral exit provide true sovereignty to the user at all times, and atomic swaps remove counterparty risk. Together, these features enable Flashnet to deliver the fastest and most secure native Bitcoin trading experience possible. Was this page helpful? YesNo [Trust Model\ \ Previous](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model) [Trading Fees\ \ Next](https://docs.flashnet.xyz/products/flashnet-trade/fees) ⌘I --- # How it works - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-rfq/overview#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Flashnet RFQ How it works [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * [How it works](https://docs.flashnet.xyz/products/flashnet-rfq/overview) * [Trust Model](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model) * Flashnet Trade close On this page * [Overview](https://docs.flashnet.xyz/products/flashnet-rfq/overview#overview) * [Why It Matters](https://docs.flashnet.xyz/products/flashnet-rfq/overview#why-it-matters) * [Integration Guide](https://docs.flashnet.xyz/products/flashnet-rfq/overview#integration-guide) * [Support](https://docs.flashnet.xyz/products/flashnet-rfq/overview#support) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/rfq-light.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=11456b57ae1bd60fcc3091bd170a08b6) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/rfq-dark.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=4c1ba426a0166c79f2b167b5faa574c4) Flashnet RFQ enables native Bitcoin trading with minimal market impact through a Request-for-Quote (RFQ) model, designed as an API-first solution for Bitcoin application developers. This integration-focused approach allows businesses to embed deep liquidity directly into their applications while maintaining full control of their user experience. #### [​](https://docs.flashnet.xyz/products/flashnet-rfq/overview#overview) Overview Flashnet RFQ is built on a distributed network of market makers who respond to quote requests with executable atomic swaps on Spark. This design optimizes for best execution of large trades—handling quotes off-chain—while ensuring trustless settlement of native Bitcoin assets through atomic swap primitives. **1\. API Integration** To provide RFQ functionality, developers integrate the Flashnet RFQ API into their apps. This preserves their brand experience while adding deep liquidity functionality. The API is designed for easy integration, requiring minimal changes or additions to existing applications. **2\. Quote Request Process** When a user wants to trade, the application submits a signed RFQ with trade parameters (size, pair, direction). This request includes a leaf specification defining the desired trade. The request is broadcasted to a public channel where multiple market makers compete to provide the best price. **3\. Market Maker Competition** Market makers analyze the request and respond with executable quotes, creating atomic swaps on Spark that match the requested parameters. Each quote represents a fully-formed, ready-to-execute trade with a specific price. Applications can optionally include an integrator fee in these quotes, creating a revenue stream. **4\. Execution and Settlement** The application receives all quotes and can select the most favorable one based on price or other factors. When a quote is chosen, the application executes the corresponding atomic swap directly on Spark, settling the trade instantly and trustlessly. Funds move directly between the user and market maker without intermediaries. #### [​](https://docs.flashnet.xyz/products/flashnet-rfq/overview#why-it-matters) Why It Matters This system provides multiple benefits for Bitcoin application developers: * **Keep Users in Your Ecosystem**: Users never leave your application to access liquidity * **Revenue Opportunities**: Custom fee structures and revenue sharing models * **Trustless Execution**: No custody or counterparty risk through Spark’s atomic swap primitive * **Deep Liquidity**: Access to professional market makers for best execution * **No Market Impact**: Execute large trades without moving the market By separating quote generation from settlement, the system provides competitive pricing while maintaining security guarantees. The atomic swap model ensures that trades either complete fully or not at all, eliminating settlement risk while the competition between market makers ensures tight spreads and optimal pricing. [​](https://docs.flashnet.xyz/products/flashnet-rfq/overview#integration-guide) Integration Guide ---------------------------------------------------------------------------------------------------- For code examples and implementation details, see our [API Reference](https://docs.flashnet.xyz/api-reference/rfq) . [​](https://docs.flashnet.xyz/products/flashnet-rfq/overview#support) Support -------------------------------------------------------------------------------- Need help with integration? Contact our developer support team at [\[email protected\]](https://docs.flashnet.xyz/cdn-cgi/l/email-protection#ea988c9baa8c868b9982848f9ec4929390) . Was this page helpful? YesNo [Advanced Topics\ \ Previous](https://docs.flashnet.xyz/products/flashnet-amm/advanced) [Trust Model\ \ Next](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model) ⌘I --- # Trading Fees - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-trade/fees#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Flashnet Trade Trading Fees [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade * [How it works](https://docs.flashnet.xyz/products/flashnet-trade/overview) * [Trading Fees](https://docs.flashnet.xyz/products/flashnet-trade/fees) * [Vaults](https://docs.flashnet.xyz/products/flashnet-vaults) * Trading Platform * [Trust Model](https://docs.flashnet.xyz/products/flashnet-trade/trust-model) close On this page * [Fee Schedule](https://docs.flashnet.xyz/products/flashnet-trade/fees#fee-schedule) * [Understanding Maker vs Taker](https://docs.flashnet.xyz/products/flashnet-trade/fees#understanding-maker-vs-taker) * [Volume Calculation](https://docs.flashnet.xyz/products/flashnet-trade/fees#volume-calculation) * [Fee Collection](https://docs.flashnet.xyz/products/flashnet-trade/fees#fee-collection) Flashnet’s goal is to be the **cheapest place on earth to trade BTC**, and that starts with fees. Flashnet will host the lowest fees to swap BTC of any platform. Flashnet Trade uses a maker-taker fee model to determine trading fees. The fee rates are based on your 30-day trading volume across all trading pairs. [​](https://docs.flashnet.xyz/products/flashnet-trade/fees#fee-schedule) Fee Schedule ---------------------------------------------------------------------------------------- ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/fee-light.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=e163b941e50b55e4dabe88839415a864) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/fee-dark.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=e86939d86dc889b0deaa2acadf9f1e9c) [​](https://docs.flashnet.xyz/products/flashnet-trade/fees#understanding-maker-vs-taker) Understanding Maker vs Taker ------------------------------------------------------------------------------------------------------------------------ * **Maker Orders**: Orders that add liquidity to the order book (limit orders that don’t match immediately). These orders receive the maker fee rate. * **Taker Orders**: Orders that remove liquidity from the order book (market orders or limit orders that match immediately). These orders are charged the taker fee rate. [​](https://docs.flashnet.xyz/products/flashnet-trade/fees#volume-calculation) Volume Calculation ---------------------------------------------------------------------------------------------------- * Trading volume is calculated on a 30-day rolling basis * Volume includes all trading pairs * Volume is denominated in USD value at the time of trade [​](https://docs.flashnet.xyz/products/flashnet-trade/fees#fee-collection) Fee Collection -------------------------------------------------------------------------------------------- * Fees are deducted automatically from the proceeds of each trade * Fees are always collected in the quote currency of the trading pair Was this page helpful? YesNo [How it works\ \ Previous](https://docs.flashnet.xyz/products/flashnet-trade/overview) [Vaults\ \ Next](https://docs.flashnet.xyz/products/flashnet-vaults) ⌘I --- # Vaults - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-vaults#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Flashnet Trade Vaults [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade * [How it works](https://docs.flashnet.xyz/products/flashnet-trade/overview) * [Trading Fees](https://docs.flashnet.xyz/products/flashnet-trade/fees) * [Vaults](https://docs.flashnet.xyz/products/flashnet-vaults) * Trading Platform * [Trust Model](https://docs.flashnet.xyz/products/flashnet-trade/trust-model) close On this page * [Earn yield on native BTC markets](https://docs.flashnet.xyz/products/flashnet-vaults#earn-yield-on-native-btc-markets) * [How It Works](https://docs.flashnet.xyz/products/flashnet-vaults#how-it-works) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/vault-light.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=8c45ab577386c66ec7b23f6cdb46be20) ![](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/vault-dark.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=d953e8a2988ef00debc5641dcd51b9cf) [​](https://docs.flashnet.xyz/products/flashnet-vaults#earn-yield-on-native-btc-markets) Earn yield on native BTC markets ============================================================================================================================ Flashnet Vaults let users deposit BTC into a secure pool that’s leveraged by market makers for active, efficient liquidity provisioning, earning a share of the profits without impermanent loss. Vaults allow for anyone to receive a portion of the most performant native BTC market. [​](https://docs.flashnet.xyz/products/flashnet-vaults#how-it-works) How It Works ------------------------------------------------------------------------------------ Flashnet Vaults use our intent-based execution engine paired with a strict policy engine to enable users to delegate trades to market makers who run sophisticated trading operations. The users get vault-tokens that represent their share of the pool, which they can redeem for profits (or losses) and their deposit basis at any time. This is a **trusted** solution, as funds are held on the Flashnet settlement layer. 1. Deposit BTC: Users deposit funds into a given Vault and multisig. 2. Vault Tokens: Users receive vault-tokens that represent their share of the pool. 3. Secured: A validator network signs off on all Vault actions and fund movements, under constraints of the Vault strategy. 4. Computed in TEE: A Trusted Execution Environment ensures tamper-proof operations. 5. Liquidity Use: Market makers tap the pool for native BTC markets. 6. Yield: Users earn proportional profits from market-maker trading profits. Yield is paid out directly to their Spark balance. Was this page helpful? YesNo [Trading Fees\ \ Previous](https://docs.flashnet.xyz/products/flashnet-trade/fees) [Overview\ \ Next](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/overview) ⌘I --- # Trust Model - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Flashnet RFQ Trust Model [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * [How it works](https://docs.flashnet.xyz/products/flashnet-rfq/overview) * [Trust Model](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model) * Flashnet Trade close On this page * [Trustless RFQ Process](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#trustless-rfq-process) * [How It Works](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#how-it-works) * [Risks and Mitigations](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#risks-and-mitigations) * [Verification Log](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#verification-log) * [How It Works](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#how-it-works-2) * [Verification Without Information Leakage](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#verification-without-information-leakage) * [Gateway Security](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#gateway-security) * [Security Measures](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#security-measures) Flashnet RFQ is designed to be a fully trustless system where users maintain complete control over their funds throughout the quoting and trading process. The system architecture eliminates counterparty risk through atomic execution and provides transparency through a verifiable public log. * * * [​](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#trustless-rfq-process) Trustless RFQ Process --------------------------------------------------------------------------------------------------------------- Flashnet RFQ operates on a strict principle of user sovereignty, where the Flashnet infrastructure acts only as a communication layer between users and market makers. ### [​](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#how-it-works) How It Works 1. **User in Control**: Users always maintain custody of their funds throughout the entire process 2. **Atomic Execution**: Trades execute as atomic swaps on Spark, ensuring trades are either executed completely or not at all 3. **Quote Verification**: Users can independently verify and select the best quotes 4. **No Middleman Risk**: Direct settlement between user and chosen market maker The user’s application never relinquishes control of funds to Flashnet or market makers. When a trade executes, it happens in a single, atomic operation where both sides of the trade (user assets and market maker assets) are swapped simultaneously, eliminating counterparty risk. ### [​](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#risks-and-mitigations) Risks and Mitigations The primary risks in any RFQ system involve information leakage, front-running, and quote manipulation. Flashnet RFQ addresses these through: * **Signed Quotes**: All quotes are cryptographically signed by market makers * **Quote Expiration**: Quotes have strict time limitations to prevent staleness * **Direct Execution**: Users execute chosen swaps directly on Spark, not through intermediaries * * * [​](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#verification-log) Verification Log ----------------------------------------------------------------------------------------------------- Flashnet RFQ maintains a public, cryptographically verifiable log of all RFQ activities while preserving privacy. ### [​](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#how-it-works-2) How It Works The verification log records hashed representations of: 1. **Quote Requests**: Hashed request parameters that hide specific amounts and values 2. **Quote Responses**: Hashed quote data that masks exact prices and sizes 3. **Request-Response Mapping**: Cryptographic proof linking quotes to requests This system allows users and market makers to verify: * That all requests were properly forwarded to market makers * That all quotes received were properly forwarded to users * The fairness and completeness of the RFQ process ### [​](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#verification-without-information-leakage) Verification Without Information Leakage The verification log is designed so that only the specific user and market maker involved in a transaction can verify their own requests and quotes, while the general public cannot see sensitive information like trade sizes, prices, or identities. This provides accountability without sacrificing privacy. * * * [​](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#gateway-security) Gateway Security ----------------------------------------------------------------------------------------------------- While the RFQ Gateway serves as the communication layer, its design ensures that even if compromised, it cannot impact user funds. ### [​](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#security-measures) Security Measures 1. **No Custody**: The Gateway never takes custody of funds 2. **Signed Messages**: All messages are cryptographically signed, preventing tampering 3. **Distributed Architecture**: No single point of failure in the system 4. **Redundant Verification**: Multiple ways for users to verify quote authenticity Even in the worst-case scenario of a complete Gateway compromise, an attacker could at most: * Prevent messages from being delivered (mitigated by timeout mechanisms) * Send invalid quotes (rejected by client-side verification) * Withhold some quotes (mitigated by market competition and timeout alerts) In no scenario can a compromised Gateway access user funds or execute trades without explicit user approval. * * * Flashnet RFQ combines the speed of centralized communication with the security of trustless execution. By separating the messaging layer (Gateway) from the settlement layer (Spark), the system delivers optimal performance without compromising on security or user sovereignty. Was this page helpful? YesNo [How it works\ \ Previous](https://docs.flashnet.xyz/products/flashnet-rfq/overview) [How it works\ \ Next](https://docs.flashnet.xyz/products/flashnet-trade/overview) ⌘I --- # Trust Model - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Flashnet Trade Trust Model [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade * [How it works](https://docs.flashnet.xyz/products/flashnet-trade/overview) * [Trading Fees](https://docs.flashnet.xyz/products/flashnet-trade/fees) * [Vaults](https://docs.flashnet.xyz/products/flashnet-vaults) * Trading Platform * [Trust Model](https://docs.flashnet.xyz/products/flashnet-trade/trust-model) close On this page * [Execution](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#execution) * [How It Works](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#how-it-works) * [Risks and Mitigations](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#risks-and-mitigations) * [Order Matching](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#order-matching) * [How It Works](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#how-it-works-2) * [Settlement](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#settlement) * [How It Works](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#how-it-works-3) * [Further Details](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#further-details) Flashnet Trade is designed to minimize trust while upholding user sovereignty and delivering a fast, secure trading infrastructure. The flow comprises of three core, distinct components: **Matching**, **Execution**, and **Settlement** (via **Spark**). The arrangement of each is intentionally designed to maximally balance efficiency, security, and user control, as detailed below. * * * [​](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#execution) Execution ----------------------------------------------------------------------------------------- Execution in Flashnet Trade is powered by an intent-based execution engine, which is verified by a distributed network of validators. These validators confirm the intent behind trade matches and collaborate to settle trades securely. ### [​](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#how-it-works) How It Works * When a match is triggered by a Flashnet market, funds are temporarily held in a delegated validator wallet. This wallet is jointly controlled by the user and a consortium of validators, ensuring that validators cannot move funds unilaterally. * Validators can only sign off on transactions that match the user’s intent. This setup minimizes the time funds are outside the user’s full self-custody, enabling non-interactive, fair, and transparent trade settlement. * Both the validators and the settlement process run within a Trusted Execution Environment, which provides cryptographic attestations to verify their legitimacy to external parties. ### [​](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#risks-and-mitigations) Risks and Mitigations The primary risk arises if a majority of validators are compromised, potentially allowing them to authorize fraudulent transactions. To mitigate this: * Users can always exit by: * Unilaterally sequencing funds to Layer 1, bypassing the settlement layer entirely. * Collaborating with a minority of validators to redirect funds to a new address under their sole control. As long as a minority of validators remain honest, the user’s funds stay secure. * * * [​](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#order-matching) Order Matching --------------------------------------------------------------------------------------------------- Order matching is performed in a tight-knit centralized system to prioritize high-efficiency matching. ### [​](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#how-it-works-2) How It Works * The matching engine processes orders based on standard price/time priority. * The matching engine does not touch funds, it simply matches orders and reports the results to the execution layer. * * * [​](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#settlement) Settlement ------------------------------------------------------------------------------------------- **Spark** is a scaling solution that enables instant and free transactions for native BTC and other Bitcoin assets. It implements a custom-statechain like design which allows transactions to be settled off-chain with L1 guarantees, in the same way as the Lightning Network. ### [​](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#how-it-works-3) How It Works Spark operates under a **1/n trust assumption**, meaning the system remains secure as long as at least one of the _n_ validation parties is honest. This approach maximizes scalability and concurrency while reducing reliance on centralized trust. ### [​](https://docs.flashnet.xyz/products/flashnet-trade/trust-model#further-details) Further Details For a comprehensive explanation of Spark’s trust model, refer to the [Spark Trust Model documentation](https://docs.spark.info/spark/trust-model) . * * * Was this page helpful? YesNo [Market Data\ \ Previous](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/market-data) ⌘I --- # Page Not Found [Skip to main content](https://docs.flashnet.xyz/api-reference/rfq#content-area) ##### Auth * [POST\ \ Challenge](https://docs.flashnet.xyz/api-reference/auth/challenge) * [POST\ \ Verify](https://docs.flashnet.xyz/api-reference/auth/verify) ##### Clawback * [POST\ \ Check Clawback Eligibility](https://docs.flashnet.xyz/api-reference/clawback/check-clawback-eligibility) * [POST\ \ Clawback Funds](https://docs.flashnet.xyz/api-reference/clawback/clawback-funds) ##### Hosts * [GET\ \ Get Host Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/hosts/get-host-fee-withdrawal-history) * [POST\ \ Get Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-host-fees) * [POST\ \ Get Pool Host Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-host-fees) * [POST\ \ Register Host](https://docs.flashnet.xyz/api-reference/hosts/register-host) * [POST\ \ Withdraw Host Fees](https://docs.flashnet.xyz/api-reference/hosts/withdraw-host-fees) * [GET\ \ Get Host](https://docs.flashnet.xyz/api-reference/hosts/get-host) * [GET\ \ Get Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-integrator-fees) * [POST\ \ Get Pool Integrator Fees](https://docs.flashnet.xyz/api-reference/hosts/get-pool-integrator-fees) ##### Integrators * [GET\ \ Get Integrator Fee Withdrawal History](https://docs.flashnet.xyz/api-reference/integrators/get-integrator-fee-withdrawal-history) * [POST\ \ Withdraw Integrator Fees](https://docs.flashnet.xyz/api-reference/integrators/withdraw-integrator-fees) ##### Liquidity * [POST\ \ Add liquidity](https://docs.flashnet.xyz/api-reference/liquidity/add-liquidity) * [POST\ \ Simulate Add Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-add-liquidity) * [GET\ \ Get Liquidity Positions](https://docs.flashnet.xyz/api-reference/liquidity/get-liquidity-positions) * [POST\ \ Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/remove-liquidity) * [POST\ \ Simulate Remove Liquidity](https://docs.flashnet.xyz/api-reference/liquidity/simulate-remove-liquidity) ##### Status * [GET\ \ Settlement Health Check (uses grpc.health.v1 Health/Check)](https://docs.flashnet.xyz/api-reference/status/settlement-health-check-uses-grpchealthv1-healthcheck) ##### Pools * [GET\ \ List Pools](https://docs.flashnet.xyz/api-reference/pools/list-pools) * [POST\ \ Create CP Pool](https://docs.flashnet.xyz/api-reference/pools/create-cp-pool) * [POST\ \ Create Bonding Pool](https://docs.flashnet.xyz/api-reference/pools/create-bonding-pool) * [POST\ \ Confirm Initial Deposit](https://docs.flashnet.xyz/api-reference/pools/confirm-initial-deposit) * [GET\ \ Get Pool](https://docs.flashnet.xyz/api-reference/pools/get-pool) * [GET\ \ Get LP Position](https://docs.flashnet.xyz/api-reference/pools/get-lp-position) ##### Swaps * [GET\ \ Get Pool Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-pool-swaps) * [POST\ \ Execute Route Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-route-swap) * [POST\ \ Simulate Route Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-route-swap) * [POST\ \ Execute Swap](https://docs.flashnet.xyz/api-reference/swaps/execute-swap) * [POST\ \ Simulate Swap](https://docs.flashnet.xyz/api-reference/swaps/simulate-swap) * [GET\ \ Get Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-swaps) * [GET\ \ Get User Swaps](https://docs.flashnet.xyz/api-reference/swaps/get-user-swaps) close [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Page Not Found [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) 404 Page Not Found ============== We couldn't find the page. Maybe you were looking for one of these pages below? [How it works](https://docs.flashnet.xyz/products/flashnet-rfq/overview#how-it-works) [Trust Model](https://docs.flashnet.xyz/products/flashnet-rfq/trust-model#trustless-rfq-process) [Architecture](https://docs.flashnet.xyz/architecture#overview) ⌘I --- # Overview - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/overview#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Trading Platform Overview [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade * [How it works](https://docs.flashnet.xyz/products/flashnet-trade/overview) * [Trading Fees](https://docs.flashnet.xyz/products/flashnet-trade/fees) * [Vaults](https://docs.flashnet.xyz/products/flashnet-vaults) * Trading Platform * [Overview](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/overview) * [Creating a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/creating-wallet) * [Importing a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/importing-wallet) * [Deposits](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/deposits) * [Withdrawals](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/withdrawals) * [Orders](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/orders) * [Market Data](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/market-data) * [Trust Model](https://docs.flashnet.xyz/products/flashnet-trade/trust-model) close The trading platform is a web application that allows users to trade via the Flashnet Trade product. Users can create a non-custodial wallet directly within the webapp, track market data, and place orders. ![Trading Platform](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/assets/trading-platform.png?w=2500&fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=007d28c2940b83ae5c2b9b9348720fa0) On the [Flashnet Trade](https://trade.flashnet.xyz/) platform, users can instantly deposit and trade native BTC and other Bitcoin assets. Check out our guides: * [Creating a wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/creating-wallet) * [Importing a wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/importing-wallet) * [Depositing assets](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/deposits) * [Withdrawing assets](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/withdrawals) * [Placing an order](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/orders) * [Monitoring markets](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/market-data) Was this page helpful? YesNo [Vaults\ \ Previous](https://docs.flashnet.xyz/products/flashnet-vaults) [Creating a Wallet\ \ Next](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/creating-wallet) ⌘I --- # Market Data - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/market-data#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Trading Platform Market Data [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade * [How it works](https://docs.flashnet.xyz/products/flashnet-trade/overview) * [Trading Fees](https://docs.flashnet.xyz/products/flashnet-trade/fees) * [Vaults](https://docs.flashnet.xyz/products/flashnet-vaults) * Trading Platform * [Overview](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/overview) * [Creating a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/creating-wallet) * [Importing a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/importing-wallet) * [Deposits](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/deposits) * [Withdrawals](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/withdrawals) * [Orders](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/orders) * [Market Data](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/market-data) * [Trust Model](https://docs.flashnet.xyz/products/flashnet-trade/trust-model) close Coming soon! Was this page helpful? YesNo [Orders\ \ Previous](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/orders) [Trust Model\ \ Next](https://docs.flashnet.xyz/products/flashnet-trade/trust-model) ⌘I --- # Creating a Wallet - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/creating-wallet#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Trading Platform Creating a Wallet [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade * [How it works](https://docs.flashnet.xyz/products/flashnet-trade/overview) * [Trading Fees](https://docs.flashnet.xyz/products/flashnet-trade/fees) * [Vaults](https://docs.flashnet.xyz/products/flashnet-vaults) * Trading Platform * [Overview](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/overview) * [Creating a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/creating-wallet) * [Importing a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/importing-wallet) * [Deposits](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/deposits) * [Withdrawals](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/withdrawals) * [Orders](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/orders) * [Market Data](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/market-data) * [Trust Model](https://docs.flashnet.xyz/products/flashnet-trade/trust-model) close Coming soon! Was this page helpful? YesNo [Overview\ \ Previous](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/overview) [Importing a Wallet\ \ Next](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/importing-wallet) ⌘I --- # Importing a Wallet - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/importing-wallet#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Trading Platform Importing a Wallet [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade * [How it works](https://docs.flashnet.xyz/products/flashnet-trade/overview) * [Trading Fees](https://docs.flashnet.xyz/products/flashnet-trade/fees) * [Vaults](https://docs.flashnet.xyz/products/flashnet-vaults) * Trading Platform * [Overview](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/overview) * [Creating a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/creating-wallet) * [Importing a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/importing-wallet) * [Deposits](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/deposits) * [Withdrawals](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/withdrawals) * [Orders](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/orders) * [Market Data](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/market-data) * [Trust Model](https://docs.flashnet.xyz/products/flashnet-trade/trust-model) close Coming soon! Was this page helpful? YesNo [Creating a Wallet\ \ Previous](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/creating-wallet) [Deposits\ \ Next](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/deposits) ⌘I --- # Deposits - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/deposits#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Trading Platform Deposits [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade * [How it works](https://docs.flashnet.xyz/products/flashnet-trade/overview) * [Trading Fees](https://docs.flashnet.xyz/products/flashnet-trade/fees) * [Vaults](https://docs.flashnet.xyz/products/flashnet-vaults) * Trading Platform * [Overview](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/overview) * [Creating a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/creating-wallet) * [Importing a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/importing-wallet) * [Deposits](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/deposits) * [Withdrawals](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/withdrawals) * [Orders](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/orders) * [Market Data](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/market-data) * [Trust Model](https://docs.flashnet.xyz/products/flashnet-trade/trust-model) close Coming soon! Was this page helpful? YesNo [Importing a Wallet\ \ Previous](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/importing-wallet) [Withdrawals\ \ Next](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/withdrawals) ⌘I --- # Withdrawals - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/withdrawals#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Trading Platform Withdrawals [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade * [How it works](https://docs.flashnet.xyz/products/flashnet-trade/overview) * [Trading Fees](https://docs.flashnet.xyz/products/flashnet-trade/fees) * [Vaults](https://docs.flashnet.xyz/products/flashnet-vaults) * Trading Platform * [Overview](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/overview) * [Creating a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/creating-wallet) * [Importing a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/importing-wallet) * [Deposits](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/deposits) * [Withdrawals](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/withdrawals) * [Orders](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/orders) * [Market Data](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/market-data) * [Trust Model](https://docs.flashnet.xyz/products/flashnet-trade/trust-model) close Coming soon! Was this page helpful? YesNo [Deposits\ \ Previous](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/deposits) [Orders\ \ Next](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/orders) ⌘I --- # Orders - Flashnet [Skip to main content](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/orders#content-area) [Flashnet home page![light logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/light.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=73659882e6967983c653d8c04f4f4a9f)![dark logo](https://mintcdn.com/flashnet-9a0adcc4/9LEJH5DsI8oouIuR/logo/dark.svg?fit=max&auto=format&n=9LEJH5DsI8oouIuR&q=85&s=c7c68e4fefda1d1cdc6e74488edb2bed)](https://docs.flashnet.xyz/) Search... ⌘K Search... Navigation Trading Platform Orders [Documentation](https://docs.flashnet.xyz/introduction) [AMM API](https://docs.flashnet.xyz/api-reference/auth/challenge) ##### Getting Started * [Introducing Flashnet](https://docs.flashnet.xyz/introduction) * [Architecture](https://docs.flashnet.xyz/architecture) * [Trust Model](https://docs.flashnet.xyz/architecture/trust-model) ##### Flashnet Amm * [AMM](https://docs.flashnet.xyz/products/flashnet-amm/overview) * [How it works](https://docs.flashnet.xyz/products/flashnet-amm/how-it-works) ##### Quick Start * [Setup](https://docs.flashnet.xyz/products/flashnet-amm/setup) * [Config & Gating](https://docs.flashnet.xyz/products/flashnet-amm/config) * [Pool Creation](https://docs.flashnet.xyz/products/flashnet-amm/creation) * [Liquidity](https://docs.flashnet.xyz/products/flashnet-amm/liquidity) * [Swaps](https://docs.flashnet.xyz/products/flashnet-amm/swaps) * [Route Swaps](https://docs.flashnet.xyz/products/flashnet-amm/route-swaps) * [Querying Pools](https://docs.flashnet.xyz/products/flashnet-amm/pools) * [Swap History](https://docs.flashnet.xyz/products/flashnet-amm/history) * [Fees](https://docs.flashnet.xyz/products/flashnet-amm/fees) * [Hosts](https://docs.flashnet.xyz/products/flashnet-amm/hosts) * [Advanced Topics](https://docs.flashnet.xyz/products/flashnet-amm/advanced) ##### Future Products * Flashnet RFQ * Flashnet Trade * [How it works](https://docs.flashnet.xyz/products/flashnet-trade/overview) * [Trading Fees](https://docs.flashnet.xyz/products/flashnet-trade/fees) * [Vaults](https://docs.flashnet.xyz/products/flashnet-vaults) * Trading Platform * [Overview](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/overview) * [Creating a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/creating-wallet) * [Importing a Wallet](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/importing-wallet) * [Deposits](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/deposits) * [Withdrawals](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/withdrawals) * [Orders](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/orders) * [Market Data](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/market-data) * [Trust Model](https://docs.flashnet.xyz/products/flashnet-trade/trust-model) close Coming soon! Was this page helpful? YesNo [Withdrawals\ \ Previous](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/withdrawals) [Market Data\ \ Next](https://docs.flashnet.xyz/products/flashnet-trade/trading-platform/market-data) ⌘I ---