# Table of Contents - [What is Native | Native Documentation](#what-is-native-native-documentation) - [Benefits for Key Players | Native Documentation](#benefits-for-key-players-native-documentation) - [About Native V2 | Native Documentation](#about-native-v2-native-documentation) - [Native Swap Engine | Native Documentation](#native-swap-engine-native-documentation) - [Native Credit Pool | Native Documentation](#native-credit-pool-native-documentation) - [Native Earn | Native Documentation](#native-earn-native-documentation) - [Firm Quote | Native Documentation](#firm-quote-native-documentation) - [Base and Listed Assets | Native Documentation](#base-and-listed-assets-native-documentation) - [Native Liquidity Provisioning | Native Documentation](#native-liquidity-provisioning-native-documentation) - [Single-Sided Liquidity Pools | Native Documentation](#single-sided-liquidity-pools-native-documentation) - [Slippage | Native Documentation](#slippage-native-documentation) - [Liquidity Pairing | Native Documentation](#liquidity-pairing-native-documentation) - [Swap Fees | Native Documentation](#swap-fees-native-documentation) - [Auto Sign Orders | Native Documentation](#auto-sign-orders-native-documentation) - [Total Available Liquidity | Native Documentation](#total-available-liquidity-native-documentation) - [Orderbook | Native Documentation](#orderbook-native-documentation) - [Earning Fees and Incentives | Native Documentation](#earning-fees-and-incentives-native-documentation) - [Liquidity Bootstrapping | Native Documentation](#liquidity-bootstrapping-native-documentation) - [Health Ratio | Native Documentation](#health-ratio-native-documentation) - [Add Liquidity | Native Documentation](#add-liquidity-native-documentation) - [Risks | Native Documentation](#risks-native-documentation) - [Market-Responsive Pricing | Native Documentation](#market-responsive-pricing-native-documentation) - [Pair Liquidity | Native Documentation](#pair-liquidity-native-documentation) - [Credit-Based Swap | Native Documentation](#credit-based-swap-native-documentation) - [Collateral Factor | Native Documentation](#collateral-factor-native-documentation) - [Swap with Native | Native Documentation](#swap-with-native-native-documentation) - [PMM Credit | Native Documentation](#pmm-credit-native-documentation) - [Settlement and Liquidation | Native Documentation](#settlement-and-liquidation-native-documentation) - [Claim Rewards | Native Documentation](#claim-rewards-native-documentation) - [Swap Aggregators | Native Documentation](#swap-aggregators-native-documentation) - [FirmQuote Swap APIs | Native Documentation](#firmquote-swap-apis-native-documentation) - [Asset Issuers | Native Documentation](#asset-issuers-native-documentation) - [GET Orderbook | Native Documentation](#get-orderbook-native-documentation) - [GET Indicative quote | Native Documentation](#get-indicative-quote-native-documentation) - [Guide | Native Documentation](#guide-native-documentation) - [Native Tokens Support | Native Documentation](#native-tokens-support-native-documentation) - [GET Firm quote | Native Documentation](#get-firm-quote-native-documentation) - [Error Handling | Native Documentation](#error-handling-native-documentation) - [Market Makers | Native Documentation](#market-makers-native-documentation) - [GET Transaction status | Native Documentation](#get-transaction-status-native-documentation) - [Business Source License | Native Documentation](#business-source-license-native-documentation) - [Analytics | Native Documentation](#analytics-native-documentation) - [GET Indicative quote | Native Documentation](#get-indicative-quote-native-documentation) - [Media Kit | Native Documentation](#media-kit-native-documentation) - [Addresses | Native Documentation](#addresses-native-documentation) - [For Pegged Assets | Native Documentation](#for-pegged-assets-native-documentation) - [Audits | Native Documentation](#audits-native-documentation) - [Networks | Native Documentation](#networks-native-documentation) - [Blacklisting | Native Documentation](#blacklisting-native-documentation) - [CrossChain Swap API | Native Documentation](#crosschain-swap-api-native-documentation) - [Contact | Native Documentation](#contact-native-documentation) - [Miscellaneous | Native Documentation](#miscellaneous-native-documentation) - [Compose with AMM | Native Documentation](#compose-with-amm-native-documentation) - [Firm-Quote | Native Documentation](#firm-quote-native-documentation) - [Orderbook | Native Documentation](#orderbook-native-documentation) - [Error Handling | Native Documentation](#error-handling-native-documentation) - [Sign-Quote | Native Documentation](#sign-quote-native-documentation) - [POST Settlement status | Native Documentation](#post-settlement-status-native-documentation) - [POST Cancel settlement | Native Documentation](#post-cancel-settlement-native-documentation) - [POST Cancel collateral removal | Native Documentation](#post-cancel-collateral-removal-native-documentation) - [GET Refund | Native Documentation](#get-refund-native-documentation) - [POST Request collateral removal | Native Documentation](#post-request-collateral-removal-native-documentation) - [GET Firm quote | Native Documentation](#get-firm-quote-native-documentation) - [POST Request settlement | Native Documentation](#post-request-settlement-native-documentation) - [GET Market maker info | Native Documentation](#get-market-maker-info-native-documentation) - [For General Assets | Native Documentation](#for-general-assets-native-documentation) - [On-chain events for swap | Native Documentation](#on-chain-events-for-swap-native-documentation) - [MM Pricing and Signing API | Native Documentation](#mm-pricing-and-signing-api-native-documentation) - [Miscellaneous | Native Documentation](#miscellaneous-native-documentation) - [Native Market Makers API | Native Documentation](#native-market-makers-api-native-documentation) - [Minimum Bridge To Amount | Native Documentation](#minimum-bridge-to-amount-native-documentation) - [AMM Fallback | Native Documentation](#amm-fallback-native-documentation) - [Multihop | Native Documentation](#multihop-native-documentation) - [POST Collateral removal status | Native Documentation](#post-collateral-removal-status-native-documentation) - [GET Transaction history | Native Documentation](#get-transaction-history-native-documentation) --- # What is Native | Native Documentation ![Page cover](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FgXWP8VJOFb0XpdZw5Een%252FFrame%25204.png%3Falt%3Dmedia%26token%3D015dcc18-c80f-4c1e-b8bd-34c5de3276b3&width=1248&dpr=3&quality=100&sign=789a473&sv=2) **Native** is an on-chain platform to build token liquidity that is openly accessible and cost effective. It serves as an alternative to traditional **AMMs** through integration of two innovative designs: the [**Native Swap Engine**](https://docs.native.org/native-dev/modules/native-swap-engine) and [**Native Credit Pool**](https://docs.native.org/native-dev/modules/native-credit-pool) **.** The vision of Native is to transform on-chain liquidity from inventory-based to credit-based. Native is designed to address the limitations of current onchain marketplaces, including liquidity fragmentation and capital inefficiency, by decoupling the pricing capability and inventory provision, paving the way for a new era in decentralized finance. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FoXQ4HtV061xS5LyUPnE7%252FOverview.png%3Falt%3Dmedia%26token%3D59bf4635-82a5-4080-8f42-cf4f796803a7&width=768&dpr=3&quality=100&sign=84f16880&sv=2) [NextAbout Native V2chevron-right](https://docs.native.org/native-dev/introduction/about-native-v2) Last updated 3 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Benefits for Key Players | Native Documentation ![Page cover](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FFZYsa35aGX5GhD7izPVm%252FFrame%25203.png%3Falt%3Dmedia%26token%3D4c8e021a-5c25-4db5-b6bd-4962e0de9ac2&width=1248&dpr=3&quality=100&sign=9f3489e5&sv=2) LPs Asset Issuers Market Makers Swappers Liquidity Providers (**LPs**) benefits from the unique design of Native Credit Pool that enables: * **Single-sided LP without impermanent loss:** Deposit a **single token** into Native Credit Pool and provide liquidity without worrying about capital loss due to market fluctuations. PMMs borrow and return exactly what they took, along with credit financing interest, ensuring your capital remains secure while earning returns. * **Unified liquidity**: Your deposit is merged into a larger credit pool with all other LPs' contributions. A single ETH can be deployed **across multiple trading pairs** rather than being tied to just one, maximizing capital efficiency and boosting liquidity across the ecosystem. * **Sustainable yields**: In addition to **trading fees**, earn **credit financing yield** from the active utilization of your capital in the credit pool, benefiting from the efficient allocation of liquidity to various market needs. circle-info Add and pair liquidity with [Credit Poolarrow-up-right](https://native.org/app/credit-pool/) on Native V2 today! Click [here](https://docs.native.org/native-dev/user-guide/add-liquidity) for a step-by-step user guide. Asset issuers can build chain-abstraction liquidity more efficiently without needing to supply capital to each AMM on every chain with segmented liquidity: * **Market-Responsive pricing**: Aligns liquidity provisioning with prevailing market prices. * **Capital-efficient liquidity provision**: Access deeper on-chain trading liquidity through a **liquidity pairing mechanism**. Active utilization ensures **no idle funds**, optimizing every asset deployed. * **Chain abstraction**: Provide **chain-abstract, liquidity-backed bridges** that unify liquidity across chains, eliminating the need for redundant capital deployment. circle-info Leverage Native's infrastructure to maximize your asset's potential. Click [here](https://docs.native.org/native-dev/build-with-native/asset-issuers) to start your integration today! circle-check Check out [this articlearrow-up-right](https://medium.com/@official_42951/pioneering-a-new-era-of-liquidity-stakestone-x-native-90d401002319) showcasing a successful use case from our recent partnership with StakeStone. Market makers benefit from large order flows via a network of relayers and access to credits for financing trades: * **Capital efficiency:** Maximize leverage by tapping into the full value of **Native Credit Pool**. * **Dynamic borrowing:** Borrow assets in **real time** based on trading needs, eliminating the need to maintain large, static inventories. * **Intent-based lending and settlement:** Customize and automate on-chain **lending and settlement** strategies. * **Single point of access to core meta-aggregators:** Gain **unified access** to top meta-aggregators, ensuring a continuous flow of substantial orders. Swappers connect end traders to a highly efficient network of PMMs powered by Native Credit Pool, ensuring they always get the best possible prices for their trades: * **Competitive pricing:** Deliver **best possible** prices for traders. * **High success rate**: Access top quotes with **low latency** and rapid execution, ensuring seamless trade finality for end users. * **On-chain executable orderbooks**: Operate on a **stable, resilient auto-sign infrastructure** with minimal downtime to provide end users with a superior trading experience. [PreviousAbout Native V2chevron-left](https://docs.native.org/native-dev/introduction/about-native-v2) [NextNative Credit Poolchevron-right](https://docs.native.org/native-dev/modules/native-credit-pool) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # About Native V2 | Native Documentation ![Page cover](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252F1FNwmBejNo3QUicZ834W%252FFrame%25205.png%3Falt%3Dmedia%26token%3Dcab6fc0f-4767-48b8-819e-235be03012a4&width=1248&dpr=3&quality=100&sign=38b598a3&sv=2) Native V2 introduces a scalable foundation of the [**Native Credit Pool**](https://docs.native.org/native-dev/modules/native-credit-pool) , and enhances the [**Native Swap Engine**](https://docs.native.org/native-dev/modules/native-swap-engine) with efficient quoting and order execution, ensuring high success rates and low latency. #### [hashtag](https://docs.native.org/native-dev/introduction/about-native-v2#key-features) Key Features: For Cheaper and Easier On-chain Liquidity**:** * [**Single-Sided Liquidity Provision**](https://docs.native.org/native-dev/concepts/single-sided-liquidity-pools) : Allows liquidity providers to supply single asset while earning yields from interests as well as trading fees. Without the need for rebalancing or adjusting. * [**Liquidity Pairing Mechanism**](https://docs.native.org/native-dev/concepts/liquidity-pairing) : Offers bootstrapping liquidity and smart pairing liquidity for listed tokens dynamically as needed. For Better and Faster Pricing**:** * [**Market-Responsive Pricing**](https://docs.native.org/native-dev/concepts/market-responsive-pricing) : Dynamically adjusts prices through PMMs to reflect real-time global market conditions. * [**Credit-Based Atomic Swap**](https://docs.native.org/native-dev/concepts/credit-based-swap) : Provides collateralized credit lines to private market makers, amplifying liquidity and trading capacity. [PreviousWhat is Nativechevron-left](https://docs.native.org/native-dev) [NextBenefits for Key Playerschevron-right](https://docs.native.org/native-dev/introduction/benefits-for-key-players) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Native Swap Engine | Native Documentation ### [hashtag](https://docs.native.org/native-dev/modules/native-swap-engine#onchain-executable-orderbook) Onchain Executable Orderbook Native introduces a **high-frequency, auto-sign orderbook** that seamlessly aligns with prevailing market prices, offering reliable quotes to ensure low latency and a high success rate by utilizing real-time on-chain inventory. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252Fj9Ecs4G6KC3rZqTxk4q4%252FOn-chain%2520Executable%2520Orderbook.png%3Falt%3Dmedia%26token%3D5d47fd0f-e4a6-4c8d-9cf8-bced10d51994&width=768&dpr=3&quality=100&sign=837de17d&sv=2) ### [hashtag](https://docs.native.org/native-dev/modules/native-swap-engine#credit-based-swap) **Credit-Based Swap** #### [hashtag](https://docs.native.org/native-dev/modules/native-swap-engine#example-credit-based-swap-in-user-action) **Example: Credit-Based Swap in User Action** ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FAaeNG5bkK2LHf6oZzJiZ%252FCredit-Based%2520Swap%2520new.png%3Falt%3Dmedia%26token%3Df4bde008-d444-4519-bf75-4e3148e170ef&width=768&dpr=3&quality=100&sign=da498248&sv=2) circle-info **Scenario**: Josh, a retail trader, wants to swap 1 ETH for USDC using a Native-powered aggregator/solver. PMM1, a trading house, has pledged **100 USDC as collateral**, securing a **$100 credit** from Native. **Step-by-Step Process**: * (**T-1:** Josh entered a swap intent to the aggregator. The aggregator checks the latest price and depth from Native orderbook endpoint) * **T0**: Josh submits a swap intent through the aggregator. * **T1**: Native Swap Engine receives the intent. PMM1 offers a **quote of 3600 USDC** using the Native Credit Pool as inventory, by leveraging its **$100 credit**. Even though it doesn’t hold USDC in its wallet. * **T2**: Josh signs and approves the transaction to swap **1 WETH for 3600 USDC**. * **T3**: * Native Credit Pool pays **Josh 3600 USDC** and receives **1 WETH**. * Native records a **long 1 WETH** and a **short 3600 USDC** position on PMM1’s credit record. * This entire process occurs **atomically in a single transaction**. #### [hashtag](https://docs.native.org/native-dev/modules/native-swap-engine#post-trade-credit-risk-management) **Post-trade: Credit Risk Management** ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252F4fPcQJnFGXOfSd7HJWl4%252Fimage.png%3Falt%3Dmedia%26token%3D7069ca92-977d-4277-ab70-e8f047a6e04b&width=768&dpr=3&quality=100&sign=46ddc60e&sv=2) circle-info **What if Price Moves?** * If the price of WETH drops to **$3598**, **$2** being cut from PMM credit * If the price of WETH stays **above $3500**, PMM1’s credit covers its position. The 100 USD collateral is used to cover the gap. * If the price drops **below $3500**, the 100 USDC collateral **and** the 1 WETH would be **subject to liquidation**. circle-info The above example assumes the [collateral factors](https://docs.native.org/native-dev/concepts/credit-based-swap/collateral-factor) for all the assets are set to 100%. [Learn more](https://docs.native.org/native-dev/concepts/credit-based-swap/collateral-factor) [PreviousNative Credit Poolchevron-left](https://docs.native.org/native-dev/modules/native-credit-pool) [NextNative Earnchevron-right](https://docs.native.org/native-dev/products/native-earn) Last updated 3 months ago * [Onchain Executable Orderbook](https://docs.native.org/native-dev/modules/native-swap-engine#onchain-executable-orderbook) * [Credit-Based Swap](https://docs.native.org/native-dev/modules/native-swap-engine#credit-based-swap) sun-brightdesktopmoon sun-brightdesktopmoon --- # Native Credit Pool | Native Documentation **Native Credit Pool** is a unified, single-sided asset supply pool that enables market makers to borrow assets for trading, thereby enhancing liquidity in the on-chain spot market. ### [hashtag](https://docs.native.org/native-dev/modules/native-credit-pool#single-sided-liquidity-provision) Single-Sided Liquidity Provision With a [single-sided liquidity](https://docs.native.org/native-dev/concepts/single-sided-liquidity-pools) model, liquidity providers are no longer constrained by pair-based deposits and suffer the impermanent loss. Assets are borrowed and returned exactly as deployed, along with accrued credit interest. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FWv2aQsE1CqQVSQRMjjUh%252FSingle-Sided%2520Liquidity%2520Provision.png%3Falt%3Dmedia%26token%3D177dd2d2-ca50-4512-98f0-e7e57dcad4f2&width=768&dpr=3&quality=100&sign=c2858428&sv=2) ### [hashtag](https://docs.native.org/native-dev/modules/native-credit-pool#liquidity-pairing-mechanism) Liquidity Pairing Mechanism Native introduces a [**Liquidity Pairing**](https://docs.native.org/native-dev/concepts/liquidity-pairing) mechanism that dynamically allocates liquidity as needed to optimize capital efficiency, yield, and risk management. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FC3e7y1gSz0Pkadps6K8r%252FLiquidity%2520Paring%2520Mechanism.png%3Falt%3Dmedia%26token%3D715ede4c-c9ac-4eb2-a380-c5b6e094891c&width=768&dpr=3&quality=100&sign=9c208696&sv=2) ### [hashtag](https://docs.native.org/native-dev/modules/native-credit-pool#liquidity-tiers-in-native-credit-pool) **Liquidity Tiers in Native Credit Pool** Assets added to the **Native Credit Pool** are categorized into **three distinct tiers**: * **Smart Pairing Liquidity**: Utilized for all trades with the higher yield and lowest risk. Provided primarily by retail liquidity providers (LPs). * **Dedicated Pairing Liquidity**: Used specifically for trading the dedicated token. Provided by both retail LPs and asset issuers. * **Bootstrapping Liquidity**: Acts as a buffer fund, utilized for all trades to ensure liquidity stability and credit-based trading. Provided by market makers. ### [hashtag](https://docs.native.org/native-dev/modules/native-credit-pool#key-benefits) **Key Benefits** * **Tiered Risk Management**: Liquidity is allocated across risk tiers, ensuring tailored exposure for LPs and optimal capital deployment. * **Dynamic Liquidity Allocation**: Assets are allocated intelligently to meet trading demands, offering smart yield opportunities for liquidity providers. * **Cost-Effective Capital Deployment**: Asset issuers benefit from efficient capital allocation and optimized incentives for liquidity provisioning. ### [hashtag](https://docs.native.org/native-dev/modules/native-credit-pool#related-concepts) Related Concepts * [Total Available Liquidity](https://docs.native.org/native-dev/concepts/total-available-liquidity) * [Health Ratio](https://docs.native.org/native-dev/concepts/health-ratio) [PreviousBenefits for Key Playerschevron-left](https://docs.native.org/native-dev/introduction/benefits-for-key-players) [NextNative Swap Enginechevron-right](https://docs.native.org/native-dev/modules/native-swap-engine) Last updated 3 months ago * [Single-Sided Liquidity Provision](https://docs.native.org/native-dev/modules/native-credit-pool#single-sided-liquidity-provision) * [Liquidity Pairing Mechanism](https://docs.native.org/native-dev/modules/native-credit-pool#liquidity-pairing-mechanism) * [Liquidity Tiers in Native Credit Pool](https://docs.native.org/native-dev/modules/native-credit-pool#liquidity-tiers-in-native-credit-pool) * [Key Benefits](https://docs.native.org/native-dev/modules/native-credit-pool#key-benefits) * [Related Concepts](https://docs.native.org/native-dev/modules/native-credit-pool#related-concepts) sun-brightdesktopmoon sun-brightdesktopmoon --- # Native Earn | Native Documentation Native enables liquidity providers to earn steady yields through single-sided liquidity provisioning. Within Native's system, there are two primary avenues for earning rewards: Flexible Earn and the Fixed-Term Earn product, all powered by Native credit pool. Native offers LPs a permissionless way to tap into best-in-class yield opportunities in single-sided liquidity provision on-chain, without the need to actively manage positions. ### [hashtag](https://docs.native.org/native-dev/products/native-earn#fixed-term-earn-product) Fixed-Term Earn Product The Fixed-Term Earn product distributes a fixed annual percentage yield (Fixed APY) over a specified period (from \[Start Time\] to \[End Time\]). LP’s liquidity will be contributed to the Native Credit Pool and receive a predetermined APY for the term, regardless of the actual fluctuating yield in the pool. This provides an optimal experience for users seeking yield certainty. #### [hashtag](https://docs.native.org/native-dev/products/native-earn#how-the-fixed-term-earn-product-works) How the Fixed-Term Earn Product Works During the open deposit period, users can supply liquidity in major base tokens, for example, single-asset USDT or USDC, into the Native Fixed-Term Earn Product. User supplied funds flow into the Native Credit Pool, where the liquidity engages in trading activities. From the Start Time to the End Time, liquidity providers earn the fixed APY, independent of the actual flexible yield rate generated in the Credit Pool. Upon successful deposit, users continue to receive the same fixed rate until the product’s maturity. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FJp50G5p7o39am5VgYxBl%252Ffixtermearninvest.png%3Falt%3Dmedia%26token%3D696ce68f-4c24-43c3-b299-1f5623ccb62a&width=768&dpr=3&quality=100&sign=3de43193&sv=2) When the Fixed-Term Earn product matures (reaching the End Time), users can withdraw their principal plus the fixed rewards accrued over the entire deposit period. (For example, an LP who deposits 1,000 USDT at the beginning of a 1-year term with a 10% APY will receive 100 USDT in rewards) Additionally, Native features an auto-rollover mechanism that allows matured but unwithdrawn funds to remain in the Credit Pool, continuing to generate yield and remaining ready for user withdrawal at any time. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FetmYM5PBM2lwrFSKm3Iu%252Ffixtermearnwithdrawl.png%3Falt%3Dmedia%26token%3Db5d0a2e0-0a50-4793-bf95-c8c850fb6504&width=768&dpr=3&quality=100&sign=5d35b81a&sv=2) ### [hashtag](https://docs.native.org/native-dev/products/native-earn#flexible-earn-product) Flexible Earn Product By supplying single-asset liquidity directly to the Native Credit Pool, LPs can also earn ongoing yields at a variable rate. This liquidity and the corresponding rewards can be withdrawn with a high degree of flexibility. When a user supplies an asset (e.g., USDT, USDC) into the Native Credit Pool, corresponding NLP tokens (e.g., nUSDT, nUSDC) are minted and credited to them. NLP tokens represent share tokens of the Native Credit Pool. Their value increases continuously, and rewards are distributed to users through periodic rebalancing. For example, assume initially that 1 nUSDT = 1 USDT, and a user mints 100 nUSDT with 100 USDT. After some time, as rewards accumulate, 1 nUSDT becomes redeemable for 1.1 USDT. The user’s 100 nUSDT would then be worth 110 USDT, representing a reward accumulation of 10 USDT. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FteLHZkACmTFYlopF0BUT%252Fflexibleearninvest.png%3Falt%3Dmedia%26token%3D9ffae469-e237-4bb0-93c3-dc0cdc8500b3&width=768&dpr=3&quality=100&sign=c9f48476&sv=2) Users realize their yields by burning NLP tokens to redeem their capital. Two withdrawal options are available: instant and scheduled. * Users can withdraw their funds and rewards immediately at a 1% discount. * Alternatively, they can schedule a withdrawal, which is processed within T+3 without any discount applied. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252Fvk9SHwpmFCenF7gL0z7d%252Fflexibleearnwithdrawl.png%3Falt%3Dmedia%26token%3D38d1b933-ee55-451d-bb4d-140019fc8405&width=768&dpr=3&quality=100&sign=ac6265eb&sv=2) [PreviousNative Swap Enginechevron-left](https://docs.native.org/native-dev/modules/native-swap-engine) [NextNative Liquidity Provisioningchevron-right](https://docs.native.org/native-dev/products/native-liquidity-provisioning) Last updated 3 months ago * [Fixed-Term Earn Product](https://docs.native.org/native-dev/products/native-earn#fixed-term-earn-product) * [Flexible Earn Product](https://docs.native.org/native-dev/products/native-earn#flexible-earn-product) sun-brightdesktopmoon sun-brightdesktopmoon --- # Firm Quote | Native Documentation One approach to execute a swap via Native is by using the `/firm-quote` endpoint, which provides a firm quote along with signed calldata for on-chain execution. For further details, refer to the following link: [FirmQuote Swap APIschevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis) ### [hashtag](https://docs.native.org/native-dev/concepts/firm-quote#the-swap-process) **The Swap Process** ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FMsLLTdBt2CeAomjPAkMf%252FNative%2520RFQ.png%3Falt%3Dmedia%26token%3Df5b26aaf-8619-42a2-9472-2062c753a693&width=768&dpr=3&quality=100&sign=caab0f36&sv=2) 1. Swappers query the `/orderbook` endpoint to obtain pricing and depth information and generate an initial quote. 2. Swappers submit the swap parameters, including the amount and token addresses, via the `/firm-quote` endpoint to receive a firm quote and executable calldata. 3. The calldata is executed on the blockchain to finalize the swap. ### [hashtag](https://docs.native.org/native-dev/concepts/firm-quote#key-considerations) **Key Considerations** * Utilize the `/orderbook` or `/indicative-quote` endpoints for initial pricing estimates, typically displayed on the primary swap interface. The `/firm-quote` endpoint should be used for finalizing quotes before on-chain transactions. * The `/firm-quote` endpoint may experience rate limits and slightly higher latency due to inventory control, additional checks, and signing processes. * Specify the "expiry" parameter when requesting a firm quote. Note that longer expiries may reduce PMM liquidity, potentially resulting in less favorable quotes. * Native aggregates liquidity from on-chain AMM DEX sources. Consequently, final signed orders may include swaps involving external liquidity. However, Swap API keys can be configured to exclusively utilize PMM quotes. [PreviousOrderbookchevron-left](https://docs.native.org/native-dev/concepts/orderbook) [NextAuto Sign Orderschevron-right](https://docs.native.org/native-dev/concepts/auto-sign-orders) Last updated 3 months ago * [The Swap Process](https://docs.native.org/native-dev/concepts/firm-quote#the-swap-process) * [Key Considerations](https://docs.native.org/native-dev/concepts/firm-quote#key-considerations) sun-brightdesktopmoon sun-brightdesktopmoon --- # Base and Listed Assets | Native Documentation Assets are categorized as: * **Base Assets**: Large-cap tokens (e.g., USDT, USDC, WBTC, WETH). * **Listed Assets**: Tokens from established protocols (e.g., STONE, mETH, stBTC). Liquidity providers can add single-sided liquidity to base or listed assets. Furthermore, additional dedicated pairing options are exclusively accessible when adding liquidity to base assets. [PreviousSlippagechevron-left](https://docs.native.org/native-dev/concepts/slippage) [NextSingle-Sided Liquidity Poolschevron-right](https://docs.native.org/native-dev/concepts/single-sided-liquidity-pools) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Native Liquidity Provisioning | Native Documentation ### [hashtag](https://docs.native.org/native-dev/products/native-liquidity-provisioning#background) Background Yield-bearing assets offer diversified returns (DeFi, RWA, CeFi), yet exits liquidity remain constrained. Direct withdrawals often require whitelisting, mandatory waiting queue in days, while AMM liquidity is expensive and vulnerable to slippage and often incorrect pricing. The key distinction between yield-bearing assets and other generic assets lies in its core pricing logic. Yield-bearing asset often has implied pricing based on underlying yield-generating assets, and often is the long term fair market pricing. AMMs are in nature not suitable to peg to this implied fair pricing. Native solves this with private market-making engine and credit pool liquidity combined, delivering instant liquidity and superior implied fair pricing. The result is a smoother user experience, higher capital efficiency, and lower liquidity costs for issuers. With Native, liquidity moves efficiently, with better prices and lower cost. ### [hashtag](https://docs.native.org/native-dev/products/native-liquidity-provisioning#how-native-works) How Native Works Native delivers instant liquidity at optimized prices for any supported asset by integrating its Swap Engine (API), Credit Pool, and Market Makers—significantly lowering the cost and operational overhead of liquidity provision. For users, swapping is straightforward: 1. Submit a swap intent (e.g., 1 stETH → ETH) via the Native Swap Engine API or a supported aggregator. 2. Receive an executable, optimized price. 3. Confirm. The swap settles instantly, like any standard token transfer. #### [hashtag](https://docs.native.org/native-dev/products/native-liquidity-provisioning#behind-the-scenes) Behind the Scenes * Optimized Pricing: Market makers quote based on mint/redeem values and real-time market data, ensuring executable, market-responsive prices. * Instant Settlement: Liquidity for swaps is drawn from the Native Credit Pool, which acts as the market maker’s inventory. LPs supply single-sided assets permissionlessly and earn yields. * Continuous Liquidity: Market makers periodically rebalance the pool, such as redeeming stETH for ETH or trading on secondary markets, to maintain readiness for future swaps. * Easy Access:Native’s pricing and liquidity are available directly through its Swap Engine API and integrated across major aggregators and gateways. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FWbotGwQd3om6FEaWRUpQ%252FCase%2520Study%2520-%2520System%2520-%25201218.png%3Falt%3Dmedia%26token%3Dd8442ac1-d51d-416f-b54f-9a8c21a5bd1b&width=768&dpr=3&quality=100&sign=61297690&sv=2) ### [hashtag](https://docs.native.org/native-dev/products/native-liquidity-provisioning#stoneusd-a-case-study) STONEUSD: A Case Study STONEUSD is a yield-bearing asset backed by a delta-neutral funding rate arbitrage portfolio. Its rebalancing mechanism enables holders to continuously accumulate returns. The STONEUSD contract maintains a fair price that governs direct minting and withdrawal. These functions, however, are restricted to allowlisted addresses that have completed KYB/KYC. For most users, swapping is therefore the primary method to acquire or exit the asset, making swap liquidity, pricing, and stability critical. StakeStone, the issuer of STONEUSD, has partnered with Native to deliver optimal swap execution—offering superior liquidity, responsive pricing, and a seamless experience for both end-users and integration partners. STONEUSD (ETH L1): 0x6A6E3a4396993A4eC98a6f4A654Cc0819538721e STONEUSD (BNB Chain): 0x8B4E28607bdcacBf937f81F29E3DAFe7Bc1D7c0b #### [hashtag](https://docs.native.org/native-dev/products/native-liquidity-provisioning#steps-of-the-integration) Steps of The Integration * List the STONEUSD trading pair on Native (on both Ethereum and BNB Chain) ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FBiWUjY5MFk8uvYt6AnMV%252FWorking%2520Collection%2520%2813%29.png%3Falt%3Dmedia%26token%3D7aa46ef1-d39c-4e4c-8965-4ac1b2c9cc91&width=768&dpr=3&quality=100&sign=31b8acac&sv=2) * Instead of bootstrapping AMM DEX liquidity, StakeStone supplies liquidity in stablecoins and ETH into the Native credit pool on Ethereum L1 and BNB Chain, serving as the initial market maker inventory. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FUxFiIGDPTp16Fi3NRAVp%252FWorking%2520Collection%2520%2814%29.png%3Falt%3Dmedia%26token%3D0767ad81-eacb-46ad-8ef3-23ab0189b06a&width=768&dpr=3&quality=100&sign=cb5c3836&sv=2) #### [hashtag](https://docs.native.org/native-dev/products/native-liquidity-provisioning#performance-and-advantage) Performance and advantage **Easily Accessible PMM Liquidity** * The liquidity powered by Native's private market making (PMM) is easily accessible across various interfaces and aggregators, such as 1inch. Projects can also integrate it directly into their own frontends using the Native Swap API. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FA5llU5UeehNd6PtqMrDP%252FWorking%2520Collection%2520%2815%29.png%3Falt%3Dmedia%26token%3Dbd76fabd-5c78-40fa-8b52-ac18294ad937&width=768&dpr=3&quality=100&sign=3d1e9528&sv=2) **Pricing Advantage and Stability** * Leveraging its PMM pricing model and inventory support, Native provides users with an optimized price for swaps of various sizes, avoiding the price volatility inherent to AMM models. Currently, STONEUSD trades with a spread of less than 3 bps, which is among the best in the market. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FA0vzydmIkgSf5rfY3MJu%252FWorking%2520Collection%2520%2816%29.png%3Falt%3Dmedia%26token%3D047b8b06-2f2a-4e3a-beaa-85c91c90e05c&width=768&dpr=3&quality=100&sign=35680ed0&sv=2) ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FsZD9v2tKIgox146mhbnD%252FWorking%2520Collection%2520%2817%29.png%3Falt%3Dmedia%26token%3D22e4937c-f1c2-46a1-b573-78779a49811a&width=768&dpr=3&quality=100&sign=b3278e33&sv=2) **High Liquidity Utilization** * With Native's PMM, all provided liquidity is actively utilized for trading at the optimal price point. This eliminates the common AMM issue where a significant portion of liquidity lies dormant at non-optimal price ranges. With an equivalent amount of liquidity, Native can offer significantly deeper tradable liquidity at competitive prices compared to typical AMM pools. ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FHgqGy632sW4U14Zm5fPH%252FWorking%2520Collection%2520%2818%29.png%3Falt%3Dmedia%26token%3D7aeb8b58-58a2-4cba-999e-2939531d4a25&width=768&dpr=3&quality=100&sign=6dc19e48&sv=2) **Lower Cost for Supplying Liquidity** * For asset issuers, establishing secondary market liquidity is essential. Native reduces this cost, as liquid assets supplied to its credit pool earn rewards at the same time. In contrast, AMM pools for yield-bearing assets often generate lower returns due to less prominent trading activity, making liquidity provision comparatively more expensive. * Check [Yield dashboardarrow-up-right](https://defillama.com/yields?project=Native+Credit+Pool&chain=Ethereum) on Native ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FdzU0vVAZMY3dLuCoAI94%252FWorking%2520Collection%2520%2819%29.png%3Falt%3Dmedia%26token%3D8a79db85-01ce-4cb4-af68-b1e096a087a7&width=768&dpr=3&quality=100&sign=3c1fec67&sv=2) [PreviousNative Earnchevron-left](https://docs.native.org/native-dev/products/native-earn) [NextOrderbookchevron-right](https://docs.native.org/native-dev/concepts/orderbook) Last updated 3 months ago * [Background](https://docs.native.org/native-dev/products/native-liquidity-provisioning#background) * [How Native Works](https://docs.native.org/native-dev/products/native-liquidity-provisioning#how-native-works) * [STONEUSD: A Case Study](https://docs.native.org/native-dev/products/native-liquidity-provisioning#stoneusd-a-case-study) sun-brightdesktopmoon sun-brightdesktopmoon --- # Single-Sided Liquidity Pools | Native Documentation The **Native Credit Pool** allows single-token liquidity provision, offering: * **No impermanent loss**: Even with multiple liquidity positions, the token balance ratio remain unchanged while each of them accrues yields. * **Minimal maintenance**: No rebalancing or adjustments are necessary; your liquidity will be automatically paired and utilised in the most efficient manner. * **Multiple reward streams**: Earn yields from PMM's interests, and swap fees from trades that utilise the liquidity you deposited. [PreviousBase and Listed Assetschevron-left](https://docs.native.org/native-dev/concepts/base-and-listed-assets) [NextTotal Available Liquiditychevron-right](https://docs.native.org/native-dev/concepts/total-available-liquidity) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Slippage | Native Documentation The slippage parameter is required for both firm quotes and auto-sign orders. Slippage is applied in the following scenarios: 1. When external liquidity is aggregated for a swap. 2. When executing auto-sign orders. If the slippage limit is exceeded during a swap: * **External liquidity**: The **Native Swap Engine** contract will revert the transaction on-chain, indicating insufficient liquidity. * **Auto-sign orders**: An error will be returned by the **Native Swap Engine** backend API, indicating that the most recent orderbook levels do not meet the required quote. [PreviousSwap Feeschevron-left](https://docs.native.org/native-dev/concepts/swap-fees) [NextBase and Listed Assetschevron-right](https://docs.native.org/native-dev/concepts/base-and-listed-assets) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Liquidity Pairing | Native Documentation By default, adding liquidity is conducted through "Smart Pairing," which signifies that the liquidity will be paired with all the assets in Native Credit Pool dynamically and as-needed, being utilised in the most efficient manner possible. Additionally when adding liquidity for base assets, LPs also have the option to exclusively pair their liquidity with a listed asset in order to earn rewards and incentives from asset issuers. These rewards are often provided to incentivise dedicated pairing and boost the total available liquidity exclusively. Refer to this guide for details: [Pair Liquiditychevron-right](https://docs.native.org/native-dev/user-guide/pair-liquidity) [PreviousTotal Available Liquiditychevron-left](https://docs.native.org/native-dev/concepts/total-available-liquidity) [NextLiquidity Bootstrappingchevron-right](https://docs.native.org/native-dev/concepts/liquidity-bootstrapping) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Swap Fees | Native Documentation Swap fees are imposed by the **Native Swap Engine** and are calculated in basis points (bps) of the input token. These fees are included in both the returned orderbooks and firm quotes. ### [hashtag](https://docs.native.org/native-dev/concepts/swap-fees#integration-partners) Integration Partners We collaborate with partners such as aggregators, wallets, and other taker/flow sources to establish customized fee rates based on individual requests and requirements. Typically, we set the swap fee to 0 or minimum to maintain a competitive offering in the market. ### [hashtag](https://docs.native.org/native-dev/concepts/swap-fees#retail) Retail For retail users swapping via Native UI, **Native Swap Engine** is utilizing the swap widget to collect a fixed 85bps swap fee. [PreviousAuto Sign Orderschevron-left](https://docs.native.org/native-dev/concepts/auto-sign-orders) [NextSlippagechevron-right](https://docs.native.org/native-dev/concepts/slippage) Last updated 4 months ago * [Integration Partners](https://docs.native.org/native-dev/concepts/swap-fees#integration-partners) * [Retail](https://docs.native.org/native-dev/concepts/swap-fees#retail) sun-brightdesktopmoon sun-brightdesktopmoon --- # Auto Sign Orders | Native Documentation Native V2 introduces **auto sign orders**, providing lower latency and higher success rates for swaps. ### [hashtag](https://docs.native.org/native-dev/concepts/auto-sign-orders#the-swap-process) **The Swap Process** ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FhgFkPmIvWtGEv0yCTdEP%252FAuto%2520Sign.png%3Falt%3Dmedia%26token%3Dcf3d9986-dbce-4614-977c-99eb1d94a965&width=768&dpr=3&quality=100&sign=c10111ce&sv=2) 1. Swappers query the `/orderbook` endpoint to gather pricing and depth information. 2. Swappers submit the swap order to the auto-sign endpoint with parameters such as the amount, token addresses, and the required `permit2` signature for the Native Swap Engine. 3. The Native Executor Network verifies, signs, and executes the swap order on-chain, ensuring enhanced speed and success rates. 4. Swappers can monitor the order status and retrieve the final on-chain transaction ID via API endpoints. ### [hashtag](https://docs.native.org/native-dev/concepts/auto-sign-orders#key-considerations) **Key Considerations** * Auto-sign orders benefit from significantly lower latency and a higher success rate due to improved inventory and swap state control. * Slippage is automatically implemented to increase success rates. If the liquidity at the most recent orderbook levels becomes unavailable, the Native Swap Engine will use the next available levels, provided the execution price remains within the defined slippage parameters. * Gas fees are included in the quote and charged in the input token. For example, swapping USDT to ETH will result in gas fees being deducted in USDT. [PreviousFirm Quotechevron-left](https://docs.native.org/native-dev/concepts/firm-quote) [NextSwap Feeschevron-right](https://docs.native.org/native-dev/concepts/swap-fees) Last updated 1 year ago * [The Swap Process](https://docs.native.org/native-dev/concepts/auto-sign-orders#the-swap-process) * [Key Considerations](https://docs.native.org/native-dev/concepts/auto-sign-orders#key-considerations) sun-brightdesktopmoon sun-brightdesktopmoon --- # Total Available Liquidity | Native Documentation #### [hashtag](https://docs.native.org/native-dev/concepts/total-available-liquidity#what-is-total-available-liquidity) What is Total Available Liquidity? **Total Available Liquidity (TAL)** represents the actual amount of funds or assets that can be actively traded or used **on-chain** at a reasonable price range. On Native, **TAL** refers to the **total USD value paired** to a listed token. * TAL is expressed in **USD value** and does not represent any specific underlying token. * TAL only defines **one side of liquidity**: the **available liquidity to sell into** for the listed token. #### [hashtag](https://docs.native.org/native-dev/concepts/total-available-liquidity#how-to-calculate) How to calculate? `TAL = HealthRatio * (Paired Liquidity USD + Bootstrapped Liquidity USD)` * **Paired Liquidity USD**: The amount of USD value paired dedicatedly to the listed token * **Bootstrapped Liquidity USD**: The amount of USD value provided by **market makers** for liquidity bootstrapping. A tool to check your TAL: [Total Available Liquidity calculatorarrow-up-right](https://www.talcal.org/) [PreviousSingle-Sided Liquidity Poolschevron-left](https://docs.native.org/native-dev/concepts/single-sided-liquidity-pools) [NextLiquidity Pairingchevron-right](https://docs.native.org/native-dev/concepts/liquidity-pairing) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Orderbook | Native Documentation The Orderbook provides real-time pricing and detailed data from private market makers, aggregated through the Native Swap Engine. Swappers can access the latest information by querying the orderbook endpoint and analyzing the returned data, which includes price levels and token quantities. **Example Response**: Copy [\ {\ "base_symbol": "WETH",\ "quote_symbol": "USDT",\ "base_address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",\ "quote_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",\ "minimum_in_base": 0,\ "side": "bid",\ "levels": [\ [\ 0.0001,\ 3213.12345\ ],\ [\ 12.75786733219471,\ 3210.15\ ],\ [\ 42,\ 3210.12\ ]\ ]\ }\ }\ \ For further details about the orderbook endpoint, refer to the following link: [Swap API](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis)\ , [PMM API](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api)\ \ **Note**: The price levels provided are non-cumulative. For example, to execute a trade of 30 ETH for USDT, the price would be calculated as: `(0.0001 * 3213.12345 + 12.75786733219471 * 3210.15 + (30 - 0.0001 - 12.75786733219471) * 3210.12) / 30 = 3,210.13276787883`\ \ [PreviousNative Liquidity Provisioningchevron-left](https://docs.native.org/native-dev/products/native-liquidity-provisioning)\ [NextFirm Quotechevron-right](https://docs.native.org/native-dev/concepts/firm-quote)\ \ Last updated 1 year ago\ \ sun-brightdesktopmoon\ \ sun-brightdesktopmoon --- # Earning Fees and Incentives | Native Documentation Adding liquidity to the **Native Credit Pool** offers **LPs** the opportunity to earn up to three distinct types of yields and rewards: 1. **Funding Interest:** The yield generated by private market makers utilizing the Native Credit Pool to facilitate swaps. This portion of the yield is automatically added into the pools at predetermined intervals. 2. **Swap Fees:** The yield generated from swappers placing orders that utilize Native Credit Pool liquidity. This yield will not be automatically added to your pool balance and require manual claiming. 3. **Additional Pairing Incentives:** Additional rewards offered by the asset issuers to incentivise the base assets paired exclusively, thereby enhancing the total available liquidity for their asset. Rewards may come in various forms. Token rewards require manual claiming, while point rewards could have many variations. [PreviousHealth Ratiochevron-left](https://docs.native.org/native-dev/concepts/health-ratio) [NextCredit-Based Swapchevron-right](https://docs.native.org/native-dev/concepts/credit-based-swap) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Liquidity Bootstrapping | Native Documentation When private market makers collaborate with Native and seek to utilize the inventory in **Native Credit Pool** to facilitate swaps, they are obligated to deposit collateral in order to obtain credits. This collateral is in the form of **Native Credit Pool** base tokens. Consequently, the collateral locked by private market makers effectively functions as a portion of liquidity known as bootstrapping liquidity that is automatically paired with all issuer assets. This implies that any listed assets with a health ratio equal or exceeding 1 can benefit from the depth and liquidity offered by private market makers, even from day one. [PreviousLiquidity Pairingchevron-left](https://docs.native.org/native-dev/concepts/liquidity-pairing) [NextHealth Ratiochevron-right](https://docs.native.org/native-dev/concepts/health-ratio) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Health Ratio | Native Documentation ### [hashtag](https://docs.native.org/native-dev/concepts/health-ratio#health-ratio) Health Ratio The Native TAL formula introduces a **Health Ratio**, which regulates access to the smart pairing liquidity of total available liquidity in Native Credit Pool. * **Default Value**: Initially set at **1.0**. * **Dynamic Adjustment**: May change based on factors affecting the on-chain liquidity of an asset. ### [hashtag](https://docs.native.org/native-dev/concepts/health-ratio#how-does-the-health-ratio-work) **How Does the Health Ratio Work?** The Health Ratio **governs the maximum liquidity** an asset issuer can access: * When an asset issuer deposits tokens into the **Native Credit Pool**, they can immediately access liquidity equivalent to the **bootstrapped liquidity** in the pool. * To increase available liquidity, asset issuers can: 1. **Improve their Health Ratio** by meeting performance or liquidity criteria. 2. **Contribute more liquid assets** to pair with their single-sided LP tokens. [PreviousLiquidity Bootstrappingchevron-left](https://docs.native.org/native-dev/concepts/liquidity-bootstrapping) [NextEarning Fees and Incentiveschevron-right](https://docs.native.org/native-dev/concepts/earning-fees-and-incentives) Last updated 1 year ago * [Health Ratio](https://docs.native.org/native-dev/concepts/health-ratio#health-ratio) * [How Does the Health Ratio Work?](https://docs.native.org/native-dev/concepts/health-ratio#how-does-the-health-ratio-work) sun-brightdesktopmoon sun-brightdesktopmoon --- # Add Liquidity | Native Documentation #### [hashtag](https://docs.native.org/native-dev/user-guide/add-liquidity#to-add-single-sided-liquidity-on-native) **To Add Single-Sided Liquidity on Native:** There are two token lists on Credit Pool, Base Tokens and Listed Tokens. 1. After connecting your wallet, choose network you want to use ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FIq1Z4H1HGTQpI9dvvv5U%252F01.png%3Falt%3Dmedia%26token%3Dc60e847e-4bfa-4f58-a51c-00d7e0e37ee9&width=768&dpr=3&quality=100&sign=ff3522c7&sv=2) **\[Base Tokens\]** 1. Select token you want to deposit and click “Add” button ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FCqC4BWo5aHJbYJVUbFnS%252F02.png%3Falt%3Dmedia%26token%3D40a1a8b9-1e0c-4135-8ff7-4b5f91cfda56&width=768&dpr=3&quality=100&sign=a8347fad&sv=2) 1. Type the amount that you want to deposit and click “Add” button ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FeziFb0yfz6ouq4ZgPUrg%252F03.png%3Falt%3Dmedia%26token%3D353b8129-d9af-492e-b067-7b30cc4250e1&width=768&dpr=3&quality=100&sign=bc3f6f29&sv=2) Smart Pairing? Your base token can be paired to all the listed tokens on Native. Enjoy high APY for base token deposit on Native! **\[Listed Tokens\]** 1. Select token you want to deposit and click “Add” button ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FAsGHqmpVDV2fbG9Qug1A%252F19.png%3Falt%3Dmedia%26token%3D85866bb5-8979-4ce2-8521-add1ee3dce9b&width=768&dpr=3&quality=100&sign=8eb51877&sv=2) 1. Type the amount that you want to deposit and click “Add” button ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252F3LA8IWApVJWQOWllVw4O%252F4.png%3Falt%3Dmedia%26token%3D9f1478e6-7985-47c3-9c55-042a3fea99a2&width=768&dpr=3&quality=100&sign=10a48a9c&sv=2) [PreviousRiskschevron-left](https://docs.native.org/native-dev/concepts/risks) [NextPair Liquiditychevron-right](https://docs.native.org/native-dev/user-guide/pair-liquidity) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Risks | Native Documentation [hashtag](https://docs.native.org/native-dev/concepts/risks#smart-contract-risk) Smart contract risk --------------------------------------------------------------------------------------------------------- Although our smart contracts have undergone audits by third-party firms, it is theoretically possible for vulnerabilities to exist. Furthermore, integrated third-party projects, including utilities and listed token projects, may also present risks associated with smart contracts. Mitigation: * Engaging multiple professional third-party firms to audit smart contracts significantly mitigates the risk of vulnerabilities. Audit reports are available \[here\]. * Additionally, we implement a bug bounty program to incentivize individuals to identify vulnerabilities in our live code, serving as an additional measure to filter out potential issues. * We meticulously evaluate any new tokens or utilities with which we choose to list and utilize, collaborating exclusively with those that have undergone auditing and demonstrated a proven track record of robust security. [hashtag](https://docs.native.org/native-dev/concepts/risks#native-credit-pool-market-risk) Native Credit Pool market risk ------------------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://docs.native.org/native-dev/concepts/risks#extremely-pricing-volatility-for-base-and-listed-tokens) Extremely Pricing Volatility for Base and Listed Tokens Price volatility is a risk for both the base and listed tokens. Market fluctuations can lead to the following outcomes: **USD Value Loss of Deposited Assets:** The value of your deposited assets may decline in terms of USD due to the price drops. **Risk of Bad Debt:** In highly volatile or extreme market conditions, the liquidation mechanisms may struggle to execute swiftly. This lag can occur due to rapidly falling token prices or a congested blockchain network, resulting in uncollateralized positions and potential bad debt within the system. Mitigation: * Several automated risk monitoring mechanisms have been implemented throughout the system to maintain operational integrity. * Conservative collateralization thresholds have been established to provide a sufficient buffer to counteract market volatility. * Additionally, high-frequency, dynamic adjustments to the lending parameters have been instituted to ensure the system can promptly respond to any changes in market conditions. ### [hashtag](https://docs.native.org/native-dev/concepts/risks#tal-for-listed-tokens-unresponsive-to-condition-change) TAL for Listed Tokens Unresponsive to Condition Change TAL, which establishes the quoting limit in base tokens, may not promptly adapt to fluctuating market conditions. This situation poses a significant risk in instances where the market health of a listed token declines sharply, particularly during periods of rapid liquidity or value deterioration. Should the adjustments to TAL be delayed or not adequately responsive to these alterations, the protocol might inadvertently overestimate the liquidity of the listed token. Consequently, this increases the probability of PMM positions that cannot be settled without incurring a loss, ultimately resulting in a loss of base tokens. Mitigation: * Collateral in the form of liquid tokens is required for all PMMs to ensure that losses are covered at a specified level. * An automated and rapid assessment of the health ratio of the listed assets has been implemented to adjust TAL parameters in a timely manner. [PreviousMarket-Responsive Pricingchevron-left](https://docs.native.org/native-dev/concepts/market-responsive-pricing) [NextAdd Liquiditychevron-right](https://docs.native.org/native-dev/user-guide/add-liquidity) Last updated 1 year ago * [Smart contract risk](https://docs.native.org/native-dev/concepts/risks#smart-contract-risk) * [Native Credit Pool market risk](https://docs.native.org/native-dev/concepts/risks#native-credit-pool-market-risk) * [Extremely Pricing Volatility for Base and Listed Tokens](https://docs.native.org/native-dev/concepts/risks#extremely-pricing-volatility-for-base-and-listed-tokens) * [TAL for Listed Tokens Unresponsive to Condition Change](https://docs.native.org/native-dev/concepts/risks#tal-for-listed-tokens-unresponsive-to-condition-change) sun-brightdesktopmoon sun-brightdesktopmoon --- # Market-Responsive Pricing | Native Documentation **Native Swap Engine** is powered by Market-Responsive Pricing from the private market makers. PMMs acturately and promptly price each token on market risk, conditions and inventory exposures. Due to the nature of this pricing mechanism, it sources liquidity from various onchain DEXs, CEXs and/or direct redemption channels, ultimately responding to the real market. There are two ways to fetch pricing from **Native Swap Engine**: #### [hashtag](https://docs.native.org/native-dev/concepts/market-responsive-pricing#orderbook-with-auto-sign) Orderbook with auto-sign An orderbook endpoint is provided to return the best pricing for each swap pairs. The levels are representing the amount of available liquidity at different price levels. Some orderbooks offer additional fields for auto-sign orders, allowing swappers to submit swap orders which will be signed, and executed in a **low latency**, **high success** rate manner. #### [hashtag](https://docs.native.org/native-dev/concepts/market-responsive-pricing#quote-request) Quote Request A backend API call is also provided to return a quote, along with a signed, executable calldata for any given swap orders. If the quote is favourable, simple take the calldata and execute before the expiration timestamp to complete the swap. [PreviousSettlement and Liquidationchevron-left](https://docs.native.org/native-dev/concepts/credit-based-swap/settlement-and-liquidation) [NextRiskschevron-right](https://docs.native.org/native-dev/concepts/risks) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Pair Liquidity | Native Documentation **To Add and Pair Liquidity on Native:** 1. After connecting your wallet, choose Network you want to use ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FSaGGYbkBoBMyiXknb3R1%252Fimage.png%3Falt%3Dmedia%26token%3D0f5867db-9e43-4cad-b19f-f589621ba187&width=768&dpr=3&quality=100&sign=1f5541ad&sv=2) 1. Click “Add & Pair Liquidity” button ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FWu4iOpPJxFylHk2F4O2O%252F5.png%3Falt%3Dmedia%26token%3D1f29e75b-9f86-40d5-85ed-a2e1052fd9be&width=768&dpr=3&quality=100&sign=bd9b2c3c&sv=2) 1. Select the base token and listed token, type the amount that you want to deposit ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252Fv4ExcXsaWEcIoH5G6g0J%252F6.png%3Falt%3Dmedia%26token%3Dd69a2d8a-e82a-4be4-be9e-24697762b326&width=768&dpr=3&quality=100&sign=9480f44f&sv=2) 1. Check the APY including pairing incentive APR and click “Add and Pair” button ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252F6HRv5WVJTmAHT1ijPHHz%252F7.png%3Falt%3Dmedia%26token%3D9288943c-72b6-434e-9664-4c3d2153caec&width=768&dpr=3&quality=100&sign=48cbbc68&sv=2) You get to enjoy “pairing incentive APR” by token issuers given as a reward for your base token dedicated pairing ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252Fsr6cdVCLKVhI4r3AgPpa%252F8.png%3Falt%3Dmedia%26token%3D80e05df6-699e-4093-8051-711cbe788e22&width=768&dpr=3&quality=100&sign=6fa639b9&sv=2) #### [hashtag](https://docs.native.org/native-dev/user-guide/pair-liquidity#to-check-your-liquidity-status-on-native) **To Check your Liquidity Status on Native:** You can check the current liquidity status through each token’s view page 1. Click “View” icon of WETH ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FMeBAHbjG4ABKMsCyHTyH%252F9.png%3Falt%3Dmedia%26token%3Dd7addce4-e954-4a5d-9010-388fa8008552&width=768&dpr=3&quality=100&sign=cacf89c9&sv=2) 1. You can view the current pairing status of your WETH and its APY ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252F2YUckNJ8LBgMik4hVig7%252F10.png%3Falt%3Dmedia%26token%3D4da0cb78-5670-48ad-b2bb-04ccd8947539&width=768&dpr=3&quality=100&sign=eeec157b&sv=2) 1. If you want to remove your liquidity, click “-” icon from the status page to withdraw ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252Ftb69Q9wjQPeEeer16Khn%252F11.png%3Falt%3Dmedia%26token%3D66932ae9-eccd-4eb0-878e-4966e21f6dab&width=768&dpr=3&quality=100&sign=9aee0b28&sv=2) [PreviousAdd Liquiditychevron-left](https://docs.native.org/native-dev/user-guide/add-liquidity) [NextClaim Rewardschevron-right](https://docs.native.org/native-dev/user-guide/claim-rewards) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Credit-Based Swap | Native Documentation Credit-based Swap is a unique design from **Native Swap Engine** that provides the opportunity for private market makers (PMMs) to execute swaps using the **Native Credit Pool** as their inventory. In this process, PMMs are required to lock on-chain collateral to gain credits. This approach enables higher capital efficiency for PMMs while offering liquidity providers a much simpler way to perform liquidity provisioning. Check out this example for how the credit-based swap works: [Native Swap Enginechevron-right](https://docs.native.org/native-dev/modules/native-swap-engine) Learn more about PMM collateral and credits: [Collateral Factorchevron-right](https://docs.native.org/native-dev/concepts/credit-based-swap/collateral-factor) [PMM Creditchevron-right](https://docs.native.org/native-dev/concepts/credit-based-swap/pmm-credit) [PreviousEarning Fees and Incentiveschevron-left](https://docs.native.org/native-dev/concepts/earning-fees-and-incentives) [NextCollateral Factorchevron-right](https://docs.native.org/native-dev/concepts/credit-based-swap/collateral-factor) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Collateral Factor | Native Documentation It is important to note that credits are in USD, computed based on the number of balances and USD prices. Additionally, each asset will be assigned a collateral factor, which is also used in this calculation. Each collateral asset is associated with a distinct collateral factor, which indicates the proportion of USD value that collateral or long positions contribute to the credit. In the example above, this factor is set at 100% for simplicity. In actuality, this factor is generally lower than 100% and is subject to adjustments based on: * USD pegged assets, for example: USDT, USDC Highest collateral factor * Large cap, blue chip assets, for example: WBTC, WETH Medium to high collateral factor * Long-tail assets Low to no collateral factor For instance, if USDT possesses a collateral factor of 90%, WBTC has a collateral factor of 80%, TOKEN1 is at 5%, and TOKEN2 stands at 0%, then a long position of each token will contribute 90 USD, 80 USD, 5 USD, and 0 USD to the credit, respectively, based on their corresponding collateral factors. [PreviousCredit-Based Swapchevron-left](https://docs.native.org/native-dev/concepts/credit-based-swap) [NextPMM Creditchevron-right](https://docs.native.org/native-dev/concepts/credit-based-swap/pmm-credit) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Swap with Native | Native Documentation **To Swap on Native:** 1. Go to Swap page and choose Network ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252F7eVJM7VtX6cPiTF1i8uw%252F20.png%3Falt%3Dmedia%26token%3D7d7176e6-1080-4e78-86a6-f33f8c1f8c97&width=768&dpr=3&quality=100&sign=37a8b5ac&sv=2) 1. Select the token from the token list ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FzDfVttRtzdBkRQJuoD38%252Fimage-13.png%3Falt%3Dmedia%26token%3D88121f7d-aac5-409c-bafd-85c0b613f23b&width=768&dpr=3&quality=100&sign=aa25275c&sv=2) ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FKKl7pbJElPf6kLUNCkwz%252Fimage-14.png%3Falt%3Dmedia%26token%3Da262a53c-cb77-4dc7-abf9-1b3f3b9e284e&width=768&dpr=3&quality=100&sign=be698706&sv=2) 1. Type the amount that you want to swap and click “Swap” button to execute a swap ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FeJmcnw2lBPEYaEOvvdqu%252Fimage.png%3Falt%3Dmedia%26token%3D39ddb979-a87b-4da3-a493-fe9fa615ec4d&width=768&dpr=3&quality=100&sign=d51d906f&sv=2) ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252Fc4ahxz7644gaeRisEvol%252Fimage.png%3Falt%3Dmedia%26token%3D4d891e06-ecf3-405c-b054-4dc11c37a0ce&width=768&dpr=3&quality=100&sign=175b8587&sv=2) 1. Review the swap, Click “Confirm Swap” button and sign transaction using your own wallet ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FMYmuJOYgz7TSBAIBWpAX%252Fimage.png%3Falt%3Dmedia%26token%3D8ad12b64-ebca-48f9-8419-bbd44004d00f&width=768&dpr=3&quality=100&sign=a20eb636&sv=2) 1. Transaction completed ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FXmPe6f3XX8if5RlnqBq0%252Fimage.png%3Falt%3Dmedia%26token%3Dfa0ef0a4-2598-48de-a18a-dcac63cc4745&width=768&dpr=3&quality=100&sign=c94a900b&sv=2) [PreviousClaim Rewardschevron-left](https://docs.native.org/native-dev/user-guide/claim-rewards) [NextSwap Aggregatorschevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # PMM Credit | Native Documentation ### [hashtag](https://docs.native.org/native-dev/concepts/credit-based-swap/pmm-credit#what-is-pmm-credit) What is PMM credit? Credit is required when private market makers facilitate credit-based swaps within the **Native Swap Engine**. For each token swap, a Private Market Maker (**PMM**) is effectively longing the input token that the user provides while simultaneously shorting the output token that is borrowed from **Native Credit Pool** and subsequently distributed to users. Consequently, in this process, credit is required to bridge the gap between the long and short positions. For instance, if a PMM is longing 3,000 USDC while shorting 1 WETH, with the price of WETH at 3600 USD, the PMM must maintain an additional 600 USD in collateral to ensure that the credit remains positive. ### [hashtag](https://docs.native.org/native-dev/concepts/credit-based-swap/pmm-credit#how-to-calculate-credit) How to calculate credit? The available credits for the PMM will be computed using: `Credit = longPositionUsd - shortPositionUsd + collateralUsd` **Note:** `longPositionUsd` and `collateralUsd` are subject to collateral factors which varies between tokens. More details [here](https://docs.native.org/native-dev/concepts/credit-based-swap/collateral-factor) . ### [hashtag](https://docs.native.org/native-dev/concepts/credit-based-swap/pmm-credit#collaterals) Collaterals **PMM**s contribute liquidity in the form of base tokens to the Native credit pools, such as USDC, USDT, WETH, and WBTC. Upon the locking the Liquidity Provider (**LP**) tokens, these liquid asset deposits are transformed into collateral which subsequently contributes to the total available credits. For instance, a **PMM** may deposit and secure 1 USDT in the Credit Pools, with the collateral factor of 90% resulting in 0.9 USD being added to the pool of available credits. ### [hashtag](https://docs.native.org/native-dev/concepts/credit-based-swap/pmm-credit#long-positions) Long Positions Furthermore, assets held in long positions also contribute credits. For example, should a **PMM** maintain a long position of 1 USDC, with the collateral factor being 80%, then 0.8 USD would similarly be added to the available credits. [PreviousCollateral Factorchevron-left](https://docs.native.org/native-dev/concepts/credit-based-swap/collateral-factor) [NextSettlement and Liquidationchevron-right](https://docs.native.org/native-dev/concepts/credit-based-swap/settlement-and-liquidation) Last updated 1 year ago * [What is PMM credit?](https://docs.native.org/native-dev/concepts/credit-based-swap/pmm-credit#what-is-pmm-credit) * [How to calculate credit?](https://docs.native.org/native-dev/concepts/credit-based-swap/pmm-credit#how-to-calculate-credit) * [Collaterals](https://docs.native.org/native-dev/concepts/credit-based-swap/pmm-credit#collaterals) * [Long Positions](https://docs.native.org/native-dev/concepts/credit-based-swap/pmm-credit#long-positions) sun-brightdesktopmoon sun-brightdesktopmoon --- # Settlement and Liquidation | Native Documentation With each credit-based swap, **PMM** will result in multiple long or short positions in **Native Credit Pool**. The **PMM** may choose to settle those positions and reclaim any available tokens. Conversely, in extreme circumstances where the amount of available credit falls below zero, an automated liquidation process will be initiated to settle the positions. ### [hashtag](https://docs.native.org/native-dev/concepts/credit-based-swap/settlement-and-liquidation#example-flow) Example Flow **PMM** faciliated a swap between 3600 USDC and 1 WETH. Now PMM has a short position of 1 WETH and a long position of 3600 USDC. Assuming WETH price remain at 3600 USD, no credits from collateral is now required or consumed. #### [hashtag](https://docs.native.org/native-dev/concepts/credit-based-swap/settlement-and-liquidation#settlement) Settlement ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252Fv9wVG1xwa3jQXavx8k0q%252FPMM%2520Settlement.png%3Falt%3Dmedia%26token%3D2bda961f-13ad-42f1-91e7-fa356c0f54e1&width=768&dpr=3&quality=100&sign=1457bc7&sv=2) 1. **PMM** now wants to settle the short position 2. 1 WETH repaid by the **PMM** to Credit Pool 3. Available credit of **PMM** goes up by 3600 USD 4. **PMM** will now have enough remaining credit to settle the 3600 USDC long position. Claiming the 3600 USDC from the Credit Pool. **PMM** may opt to complete the settlement of multiple positions in a single transaction, provided that the settlement outcome does not yield a negative credit. ### [hashtag](https://docs.native.org/native-dev/concepts/credit-based-swap/settlement-and-liquidation#liquidation) Liquidation ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FsLJsvPac6gPqSazMBRZu%252FPMM%2520Liquidation.png%3Falt%3Dmedia%26token%3D31fca718-b7a0-4dcd-a850-54dea661f0d9&width=768&dpr=3&quality=100&sign=bd89d1f4&sv=2) 1. Assume **PMM** did not settle the position and initially provided 100 USDC as collateral for 100 USD credit. 2. The price of WETH suddenly increased from 3600 USD to 3700 USD. 3. This creates a shortfall of 100 USD between the long and short positions, which is now no longer covered by the collateral, resulting in 0 credit. 4. The liquidation process triggers, and a whitelisted liquidator will call the **Native Swap Engine** to request a liquidation with all the necessary information. 5. Once the liquidation is approved and signed, the liquidator can execute the transaction on-chain. 6. Liquidator will repay 1 WETH to settle the short position, while claiming 3600 USDC from the long position, along with 100 USDC from the **PMM** collateral. [PreviousPMM Creditchevron-left](https://docs.native.org/native-dev/concepts/credit-based-swap/pmm-credit) [NextMarket-Responsive Pricingchevron-right](https://docs.native.org/native-dev/concepts/market-responsive-pricing) Last updated 1 year ago * [Example Flow](https://docs.native.org/native-dev/concepts/credit-based-swap/settlement-and-liquidation#example-flow) * [Liquidation](https://docs.native.org/native-dev/concepts/credit-based-swap/settlement-and-liquidation#liquidation) sun-brightdesktopmoon sun-brightdesktopmoon --- # Claim Rewards | Native Documentation **To Claim Rewards on Native:** You can check the current liquidity status through each token’s view page and claim rewards 1. After connecting your wallet, choose Network you want to use ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FJGFH2SHxeclTbyQR9Wlc%252Fimage.png%3Falt%3Dmedia%26token%3De224a06e-4eba-4ca4-9900-1924da6dee42&width=768&dpr=3&quality=100&sign=e79ee2f8&sv=2) 1. Click “View” button of your asset to check your liquidity ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252F6HgxDXlkGtUCj0LoNOke%252F9.png%3Falt%3Dmedia%26token%3Dc86a1151-88e8-4331-b3a4-f37ecf6e2275&width=768&dpr=3&quality=100&sign=af471e8f&sv=2) 1. Check your liquidity and its pairing status ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FjCPxzGXZFSLkv9Qyj6hg%252F10.png%3Falt%3Dmedia%26token%3D57a173bf-7bbd-4161-ac06-979db1595c4d&width=768&dpr=3&quality=100&sign=55da3742&sv=2) 1. Click “Claim” button to claim your rewards ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FiGGGYPAp4IIiTCvfHENh%252F14.png%3Falt%3Dmedia%26token%3Dba81431c-6287-46af-81e1-878185b626b5&width=768&dpr=3&quality=100&sign=1da78142&sv=2) 1. Claim rewards from each of your paired asset ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FuxtA1VbX7GgHao89W7of%252F18.png%3Falt%3Dmedia%26token%3D2bc2f0a1-57a4-4c6a-b858-93b3b4682a2b&width=768&dpr=3&quality=100&sign=864ff83c&sv=2) [PreviousPair Liquiditychevron-left](https://docs.native.org/native-dev/user-guide/pair-liquidity) [NextSwap with Nativechevron-right](https://docs.native.org/native-dev/user-guide/swap-with-native) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Swap Aggregators | Native Documentation Click on the cards below for: [FirmQuote Swap APIschevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis) circle-check Stay informed with real-time system status updates [herearrow-up-right](https://native.betteruptime.com/) on performance, upgrades, and maintenance to ensure seamless and uninterrupted relaying operations. [PreviousSwap with Nativechevron-left](https://docs.native.org/native-dev/user-guide/swap-with-native) [NextGuidechevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide) Last updated 7 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # FirmQuote Swap APIs | Native Documentation [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis#overview) Overview --------------------------------------------------------------------------------------------------------------------------- The Native FirmQuote Swap API offers a robust and user-friendly toolkit for seamless integration with Native Swap across various blockchain networks, including Ethereum, and others coming in near future. Our API enables you to leverage Request-For-Quote (RFQ) pricing from all authorized professional market makers on Native Swap Engine and place orders without incurring additional network (gas) fees. [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis#endpoints) **Endpoints** --------------------------------------------------------------------------------------------------------------------------------- Our API enables users to fetch token swap prices and generate transaction data for executing on-chain swaps via Native's infrastructure. The intelligent routing algorithm ensures users receive the best possible market prices for optimal trading outcomes. * **Orderbook:** Use `GET /orderbook` to check Native price levels for all supported pairs. This endpoint is essential for any aggregator or solver. * **Indicative quote:** Use `GET /indicative-quote` to obtain regular quotes for a given chain and token pair. Refer to the provided code snippet for implementation details. * **Firm quote:** Use `GET /firm-quote` to obtain transaction data necessary to execute swaps. Detailed code snippets are available for guidance. [PreviousGuidechevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide) [NextGET Orderbookchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/get-orderbook) Last updated 3 months ago * [Overview](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis#overview) * [Endpoints](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis#endpoints) sun-brightdesktopmoon sun-brightdesktopmoon --- # Asset Issuers | Native Documentation AMMs face fundamental inefficiencies: * Locked capital sits idle * Liquidity fragments across multiple pools * Asset issuers bear pair-based incentive costs This creates a critical challenge: bootstrapping sustainable liquidity while maintaining capital productivity. Native V2 empowers asset issuers to build efficient liquidity with half the cost of LP incentives compared to AMMs, while delivering flexible and reliable pricing. [PreviousMinimum Bridge To Amountchevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/minimum-bridge-to-amount) [NextFor Pegged Assetschevron-right](https://docs.native.org/native-dev/build-with-native/asset-issuers/for-pegged-assets) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # GET Orderbook | Native Documentation triangle-exclamation RFQ liquidity being super efficient, often moves rapidly to meet the market mid-price. Therefore it is common for one side of the liquidity to be depleted completely. Or, the available liquidity switches from one direction to the opposite. Whenever a trading direction has insufficient liquidity, the entire orderbook object (unique in base+quote addresses) **will be removed completely** from the endpoint. In such cases, quoting on this particular pair/direction is no longer available. ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/get-orderbook#get-v1-orderbook) Get price levels for all supported pair in a chain get https://v2.api.native.org/swap-api-v2/v1/orderbook Query parameters chainstring · enumRequired Blockchain name, eg: ethereum, arbitrum, ... Possible values: `ethereum``arbitrum` Header parameters apiKeystringRequired The API key that was assigned to you by Native Responses chevron-right 200 Success application/json base\_addressstringRead-onlyRequired quote\_addressstringRead-onlyRequired base\_symbolstringRead-onlyRequired quote\_symbolstringRead-onlyRequired levelsstring\[\]Read-onlyRequired sidestringRead-onlyRequired minimum\_in\_basenumberRead-onlyRequired chevron-right 500 There was an exception with the server get /v1/orderbook HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Success chevron-down [PreviousFirmQuote Swap APIschevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis) [NextGET Indicative quotechevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/get-indicative-quote) Last updated 4 months ago sun-brightdesktopmoon Copy GET /swap-api-v2/v1/orderbook?chain=ethereum HTTP/1.1 Host: v2.api.native.org apiKey: text Accept: */* Copy [\ {\ "base_address": "text",\ "quote_address": "text",\ "base_symbol": "text",\ "quote_symbol": "text",\ "levels": [\ "text"\ ],\ "side": "text",\ "minimum_in_base": 1\ }\ ] sun-brightdesktopmoon --- # GET Indicative quote | Native Documentation circle-info In `src_chain` and `dst_chain` please ensure the parameters are passed with standardised chain names. Reference: [Networks](https://docs.native.org/native-dev/resources/networks) ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/get-indicative-quote#get-v1-indicative-quote) Get amount out for selling a ERC20 / native token. get https://v2.api.native.org/swap-api-v2/v1/indicative-quote Query parameters from\_addressstringRequired Effectively `recipient`. This is the **pay out** address of the final swapped tokens. Funding address will always be the address calls Native Router. Pattern: `^0x[a-fA-F0-9]{40}$` src\_chainstring · enumRequired Blockchain name, eg: ethereum, arbitrum, ... Possible values: `ethereum``arbitrum` dst\_chainstring · enumRequired Blockchain name, eg: ethereum, arbitrum, ... Possible values: `ethereum``arbitrum` token\_instringRequired Token address for the token to be sold. Example: `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`Pattern: `^0x[a-fA-F0-9]{40}$` token\_outstringRequired Token address for the token to be bought. Example: `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`Pattern: `^0x[a-fA-F0-9]{40}$` amountnumberOptional Amount of token to be sold, in ether unit. Default: `0` amount\_weistringOptional Amount of token to be sold, in wei unit. Default: `0` expiry\_timenumberOptional The expiry time of the quote, in seconds. Default: `0` timeout\_millisnumberOptional Timeout in milliseconds Default: `2000` Header parameters apiKeystringRequired The API key that was assigned to you by Native Responses chevron-right 200 Success application/json successbooleanRead-onlyRequired buyerTokenstringRead-onlyRequired sellerTokenstringRead-onlyRequired buyerTokenAmountnumberRead-onlyRequired buyerTokenAmountWeistringRead-onlyRequired sellerTokenAmountnumberRead-onlyRequired sellerTokenAmountWeistringRead-onlyRequired pricenumberRead-onlyRequired widgetFeeUsdnumberRead-onlyRequired liquidityProviderFeeUsdnumberRead-onlyRequired totalFeeUsdnumberRead-onlyRequired routesstring\[\]Read-onlyRequired sourcestring · enumRequired Quote source name Possible values: `p0``p1``p1.1``p1.2``p1.3``p1.4``p1.5``p1.6``p1.7``p1.100``p2``p3``p4``p5``p6``p7``p8` bridgeobjectRead-onlyRequired chevron-right 500 There was an exception with the server get /v1/indicative-quote HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Success chevron-down [PreviousGET Orderbookchevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/get-orderbook) [NextGET Firm quotechevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/get-firm-quote) Last updated 5 months ago sun-brightdesktopmoon Copy GET /swap-api-v2/v1/indicative-quote?from_address=text&src_chain=ethereum&dst_chain=ethereum&token_in=text&token_out=text HTTP/1.1 Host: v2.api.native.org apiKey: text Accept: */* Copy [\ {\ "success": true,\ "buyerToken": "text",\ "sellerToken": "text",\ "buyerTokenAmount": 1,\ "buyerTokenAmountWei": "text",\ "sellerTokenAmount": 1,\ "sellerTokenAmountWei": "text",\ "price": 1,\ "widgetFeeUsd": 1,\ "liquidityProviderFeeUsd": 1,\ "totalFeeUsd": 1,\ "routes": [\ "text"\ ],\ "source": "p0",\ "bridge": {}\ }\ ] sun-brightdesktopmoon --- # Guide | Native Documentation [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#about-swap-api) About Swap API ------------------------------------------------------------------------------------------------------------------------- The Swap API connects you with Native's Credit Pool liquidity and competitive quotes, powered by Native Swap Engine. Native V2 supports two types of orders: * [Auto Sign Orders](https://docs.native.org/native-dev/concepts/auto-sign-orders) * [Firm Quote](https://docs.native.org/native-dev/concepts/firm-quote) Each order type will have their own corresponding Swap API endpoints. [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#set-up-a-swap-using-firmquote-apis) Set up a Swap using FirmQuote APIs ----------------------------------------------------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#id-1.-get-an-api-key) 1\. Get an API key To start testing, please fill out the [formarrow-up-right](https://forms.gle/12LaH1JQyhZqBHqw9) and our team will get back to you with the API key. ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#id-2.-get-orderbook) 2\. Get orderbook The latest prices for each pair Native quotes on a specified chain are published in an orderbook. circle-info Our orderbook is updated every second with the latest prices quoted by our partners Here's how to retrieve the orderbook: Copy var request = require('request'); var options = { 'method': 'GET', 'url': 'https://v2.api.native.org/swap-api-v2/v1/orderbook?chain=ethereum', 'headers': { 'apikey': 'your-api-key' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Refer to [GET Orderbook](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/get-orderbook) for the full reference. ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#sample-response) Sample response ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#id-3.-get-a-firm-quote) 3\. Get a firm quote Next, obtain a quote with a price that Native is committed to. If the quote is favorable, you can execute it by submitting the associated call data to the Native Router on-chain. ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#sample-response-1) Sample response ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#id-4.-submit-call-data-to-native-router) 4\. Submit call data to Native Router To execute a firm quote, submit a transaction on-chain to call the Native Router with the returned call data. circle-info You can find all the deployed addresses with their ABIs here: [Addresses](https://docs.native.org/native-dev/resources/addresses) Here’s an example of how to submit call data to the NativeRouter: [PreviousSwap Aggregatorschevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators) [NextFirmQuote Swap APIschevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis) Last updated 2 months ago * [About Swap API](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#about-swap-api) * [Set up a Swap using FirmQuote APIs](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#set-up-a-swap-using-firmquote-apis) * [1\. Get an API key](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#id-1.-get-an-api-key) * [2\. Get orderbook](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#id-2.-get-orderbook) * [Sample response](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#sample-response) * [3\. Get a firm quote](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#id-3.-get-a-firm-quote) * [Sample response](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#sample-response-1) * [4\. Submit call data to Native Router](https://docs.native.org/native-dev/build-with-native/swap-aggregators/guide#id-4.-submit-call-data-to-native-router) sun-brightdesktopmoon Copy [\ {\ "base_symbol": "WETH",\ "quote_symbol": "USDT",\ "base_address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",\ "quote_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",\ "minimum_in_base": 0,\ "side": "bid",\ "levels": [\ [\ 0.0001,\ 3213.12345\ ],\ [\ 12.75786733219471,\ 3210.15\ ],\ [\ 42,\ 3210.12\ ]\ ]\ }\ }\ \ Copy\ \ var request = require('request');\ var options = {\ 'method': 'GET',\ 'url': 'https://v2.api.native.org/swap-api-v2/v1/firm-quote?chain=ethereum&address=0x46b2deae6eff3011008ea27ea36b7c27255ddfa9&amount=1&token_in=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2&token_out=0xdac17f958d2ee523a2206206994597c13d831ec7',\ 'headers': {\ 'apikey': 'your-api-key'\ }\ };\ request(options, function (error, response) {\ if (error) throw new Error(error);\ console.log(response.body);\ });\ \ \ Copy\ \ {\ "success": true,\ "orders": [\ {\ "pool": "0x5984C239c08834dBCf80d4fd741B4Ed47fFe3D02",\ "signer": "0x26a5652812905cc994009902c4b4dff950f96775",\ "recipient": "0xbf381E1cBfdb0D02F3800010e490130D3dC73118",\ "sellerToken": "0x55d398326f99059ff775485246999027b3197955",\ "buyerToken": "0x2170ed0880ac9a755fd29b2688956bd959f933f8",\ "effectiveSellerTokenAmount": "1234567890123457000000",\ "sellerTokenAmount": "1234567890123457000000",\ "buyerTokenAmount": "672916829375120000",\ "deadlineTimestamp": 1746243550,\ "nonce": 1644529534389398715,\ "quoteId": "5250641e3fabe76a2026b456cbd34b67",\ "multiHop": false,\ "signature": "",\ "externalSwapCalldata": "",\ "amountOutMinimum": "0",\ "widgetFee": {\ "signer": "0x89e56DB8eCAe8BfC7ADC790Ba7C8B1CcB17B74e6",\ "feeRecipient": "0xfa7f2f2ce037fc87846fd118e944db50c31875eb",\ "feeRate": 0\ },\ "widgetFeeSignature": "baeac6970c8da7d2351eeee125ae155dcc1b4f977274f4eadaa3f818595b671003fa4df95d4c370ee170177fb9447cdcc74193019d842c38061fdc33ea8a4b2c1c"\ }\ ],\ "widgetFee": {\ "signer": "0x89e56DB8eCAe8BfC7ADC790Ba7C8B1CcB17B74e6",\ "feeRecipient": "0xfa7f2f2ce037fc87846fd118e944db50c31875eb",\ "feeRate": 0\ },\ "widgetFeeSignature": "",\ "recipient": "0xbf381E1cBfdb0D02F3800010e490130D3dC73118",\ "amountIn": "1234567890123457000000",\ "amountOut": "672916829375120000",\ "amountOutBeforeFee": "672916829375120000",\ "fallbackSwapDataArray": null,\ "tokenTransferFeeOnPercent": 0,\ "txRequest": {\ "target": "0xb2d1F342D2049684Fb2f8c4eF320633415598333",\ "calldata": "0xaf7065390000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005984c239c08834dbcf80d4fd741b4ed47ffe3d0200000000000000000000000026a5652812905cc994009902c4b4dff950f96775000000000000000000000000bf381e1cbfdb0d02f3800010e490130d3dc7311800000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f8000000000000000000000000000000000000000000000042ed123b0bd82372400000000000000000000000000000000000000000000000000956ae4a824942800000000000000000000000000000000000000000000000000000000068158fde00000000000000000000000000000000000000000000000016d28ae5ffeb2cbb5250641e3fabe76a2026b456cbd34b670000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220000000000000000000000000fa7f2f2ce037fc87846fd118e944db50c31875eb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041baeac6970c8da7d2351eeee125ae155dcc1b4f977274f4eadaa3f818595b671003fa4df95d4c370ee170177fb9447cdcc74193019d842c38061fdc33ea8a4b2c1c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\ "value": "0"\ },\ "source": [\ 1\ ],\ "errorMessage": "",\ "router_version": "v1.0.0",\ "toWrap": false,\ "toUnwrap": false,\ "amountInOffset": 36,\ "amountOutMinimumOffset": 68\ }\ \ Copy\ \ import axios from 'axios';\ import {ethers} from "ethers";\ // import routerAbi from './nativeRouter.json'\ \ const apiKey = 'your-api-key'\ const baseUrl = 'https://v2.api.native.org/swap-api-v2/v1/';\ \ const provider = 'https://eth.llamarpc.com';\ const routerAddress = '0x5C0aBf0F651613696A5c57efafC6ab59A460B32d'; // Refer to Contract Address section -> NativeRouter (Proxy) for the address\ \ const walletAddress = ''; // Your address\ const privateKey = ''; // Your private key for the address above\ \ // Swap input\ const chain = 'ethereum'; // 1, 56\ const tokenIn = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'; // ETH\ const tokenOut = '0xdAC17F958D2ee523a2206206994597C13D831ec7'; // USDT\ const amount = 1; // in ether, not in wei\ \ type FirmQuoteResult = {\ orders: any[],\ widgetFee: {\ signer: string,\ feeRecipient: string,\ feeRate: number\ },\ widgetFeeSignature: string,\ calldata: string,\ amountIn: string,\ amountOut: string,\ fallbackData: string\ }\ \ async function callFirmQuote(): Promise {\ const endpoint = 'firm-quote?';\ const headers: any = {\ api_key: apiKey,\ };\ \ const response = await axios\ .get(\ `${baseUrl}${endpoint}chain=${chain}&token_in=${tokenIn}&token_out=${tokenOut}&amount=${amount}&address=${walletAddress}`,\ {\ headers,\ }\ )\ console.log('Firm quote result', response.data)\ return response.data;\ }\ \ async function callRouterToSwap(firmQuoteResult: FirmQuoteResult) {\ const jsonRpcProvider = new ethers.JsonRpcProvider(provider);\ const signer = new ethers.Wallet(privateKey, jsonRpcProvider);\ const tx = await signer.sendTransaction({to: routerAddress, data: firmQuoteResult.calldata});\ await tx.wait()\ }\ \ async function main() {\ const firmQuoteResult = await callFirmQuote();\ await callRouterToSwap(firmQuoteResult)\ }\ \ main();\ \ sun-brightdesktopmoon --- # Native Tokens Support | Native Documentation Native Swap API and Router support swapping with native tokens for any trading pair involve wrapped-native token address (WETH9). For example, if you see WETH->USDT in `/orderbook` , you may quote and swap ETH->USDT directly. ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/native-tokens-support#quote) Quote For `/indicative-quote` and `/firm-quote` , use either: * 0 address `0x0000000000000000000000000000000000000000` * E address `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` to represent the native tokens. Pricing will follow the wrapped-native token trading pair. By default, native token trading pairs will NOT appear in /orderbook return. If you wish to include them, refer to the following section. ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/native-tokens-support#orderbook) Orderbook If you wish to receive native token trading pairs in orderbook endpoint, please add one of the following parameters in the request: * `showNative=0xE` for `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` * `showNawtive=0x0` for `0x0000000000000000000000000000000000000000` Native token trading pairs will be appended to orderbook represented by the address you prefer. ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/native-tokens-support#onchain-execution) Onchain Execution Please remember to submit payable value according to the `/firm-quote` return. The payable value is indicated under `txRequest.value`. Example: Tx: [https://www.tdly.co/shared/simulation/b25777d2-001f-4f88-a88f-ca5d0978fa9farrow-up-right](https://www.tdly.co/shared/simulation/b25777d2-001f-4f88-a88f-ca5d0978fa9f) [PreviousCompose with AMMchevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/compose-with-amm) [NextMultihopchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/multihop) Last updated 5 months ago * [Quote](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/native-tokens-support#quote) * [Orderbook](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/native-tokens-support#orderbook) * [Onchain Execution](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/native-tokens-support#onchain-execution) sun-brightdesktopmoon Copy ## Get Firm Quote for BNB->USDT curl "https://v2.api.native.org/swap-api-v2/v1/firm-quote?from_address=0xbf381E1cBfdb0D02F3800010e490130D3dC73118&amount=1&token_in=0x0000000000000000000000000000000000000000&token_out=0x55d398326f99059ff775485246999027b3197955&version=3&src_chain=bsc&dst_chain=bsc" \ -H "apiKey: $YOUR_KEY_HERE" Copy { "success": true, // ... "txRequest": { "target": "0x0f9f2366C6157F2aCD3C2bFA45Cd9031c152D2Cf", "calldata": "0x0947c2d90000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009af2f3c0cd35283e13f7087e2b34b1444b57a44c000000000000000000000000129b3d9a0a6e4beab88f5cb1e57995d72a6e24f1000000000000000000000000bf381e1cbfdb0d02f3800010e490130d3dc73118000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000003ec88e2f7f54289b8000000000000000000000000000000000000000000000003ec88e2f7f54289b800000000000000000000000000000000000000000000000000000000068e291ab000000000000000000000000000000000000000000000000259ddd003a139df80000000000000000000000000000000000000000000000000000000068e291530000000000000000000000000000000000000000000000000000000068e2917100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000dd03b615428c48978cd530d675f63a0900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002800000000000000000000000006044eef7179034319e2c8636ea885b37cbfa9aba000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000041bdd47f0b484e75590ad60e37df0d43ef592ca00d6bca48231e1994dd3cfb449f27340cff07c4a773cfce71c977bf347d190d35731dfe3dce6b2213d121ef71f01b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000416ffbdf41167d1ebbbaf99a9a685f73c76a767b041362f73544498192fee515e6564bfcfc4fe448fd5865ba6ea5035077ed3c987743becc3768410957b0ceb5a11c00000000000000000000000000000000000000000000000000000000000000", "value": "1000000000000000000" }, // ... } sun-brightdesktopmoon --- # GET Firm quote | Native Documentation circle-info In `src_chain` and `dst_chain` please ensure the parameters are passed with standardised chain names. Reference: [Networks](https://docs.native.org/native-dev/resources/networks) ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/get-firm-quote#get-v1-firm-quote) Get signed order data for selling a ERC20 / native token. Submit the return data to Native router to execute swap. get https://v2.api.native.org/swap-api-v2/v1/firm-quote Query parameters from\_addressstringRequired Effectively `recipient`. This is the **pay out** address of the final swapped tokens. Funding address will always be the address calls Native Router. Pattern: `^0x[a-fA-F0-9]{40}$` beneficiary\_addressstringOptional Address of the end user that initiated the swap request. This is REQUIRED if you are an aggregator/widget/wallet. Optional for solvers. Pattern: `^0x[a-fA-F0-9]{40}$` src\_chainstring · enumRequired Blockchain name, eg: ethereum, arbitrum, ... (refer to network name reference) Possible values: `ethereum``arbitrum` dst\_chainstring · enumRequired Blockchain name, eg: ethereum, arbitrum, ... (refer to network name reference) Possible values: `ethereum``arbitrum` token\_instringRequired Address of the token to be sold Pattern: `^0x[a-fA-F0-9]{40}$` token\_outstringRequired Address of the token to be bought Pattern: `^0x[a-fA-F0-9]{40}$` amountnumberOptional Amount of token to be sold, in ether unit. (Skip if already passing `amount_wei`) Default: `0` amount\_weistringOptional Amount of token to be sold, in wei unit. (Skip if already passing `amount`) Default: `0` expiry\_timenumberOptional The expiry time of the quote, in seconds. Recommand 60 for all networks to avoid quoting errors. Default: `0` slippagenumberOptional Number in percent. For example, passing the value 5 means 5%, 0.1 means 0.1% slippage tolerance. Recommend keeping default 0.5 Default: `0.5` timeout\_millisnumberOptional Timeout in milliseconds for the API request, useful in latency-sensitive applications. Default: `2000` versionnumberOptional The swap router version. Suggest using the latest 4 Default: `3` allow\_multihopstringOptional Whether to use multihop within all Native supported pairs for quoting. Recommanded true for wallets/widgets. Default: `false` Header parameters apiKeystringRequired The API key that was assigned to you by Native Responses chevron-right 200 Success application/json successbooleanRead-onlyRequired ordersobject\[\]Read-onlyRequired Show propertiesplus functionCallstringRead-onlyRequired widgetFeeobjectRequired Show propertiesplus widgetFeeSignaturestringRead-onlyRequired recipientstringRead-onlyRequired calldatastringRead-onlyRequired amountInstringRead-onlyRequired amountOutstringRead-onlyRequired toWrapbooleanRead-onlyRequired toUnwrapbooleanRead-onlyRequired fallbackSwapDataArraystring\[\]Read-onlyRequired tokenTransferFeeOnPercentnumberRead-onlyRequired txRequestobjectRequired Show propertiesplus sourcestring · enumRequired Quote source name Possible values: `p0``p1``p1.1``p1.2``p1.3``p1.4``p1.5``p1.6``p1.7``p1.100``p2``p3``p4``p5``p6``p7``p8` errorMessagestringRead-onlyRequired router\_versionstringRead-onlyRequired gasCostUsdnumberRead-onlyRequired estimateDurationnumberRead-onlyRequired bridgeobjectRead-onlyRequired amountInOffsetnumberRead-onlyRequired amountOutMinimumOffsetnumberRead-onlyRequired chevron-right 500 There was an exception with the server get /v1/firm-quote HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Success chevron-down [PreviousGET Indicative quotechevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/get-indicative-quote) [NextMiscellaneouschevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous) Last updated 3 months ago sun-brightdesktopmoon Copy GET /swap-api-v2/v1/firm-quote?from_address=text&src_chain=ethereum&dst_chain=ethereum&token_in=text&token_out=text HTTP/1.1 Host: v2.api.native.org apiKey: text Accept: */* Copy { "success": true, "orders": [\ {\ "pool": "text",\ "signer": "text",\ "recipient": "text",\ "sellerToken": "text",\ "buyerToken": "text",\ "effectiveSellerTokenAmount": "text",\ "sellerTokenAmount": "text",\ "buyerTokenAmount": "text",\ "deadlineTimestamp": 1,\ "nonce": 1,\ "quoteId": "text",\ "multiHop": true,\ "signature": "text",\ "externalSwapCalldata": "text",\ "amountOutMinimum": "text",\ "widgetFee": {\ "signer": "text",\ "feeRecipient": "text",\ "feeRate": 1\ },\ "widgetFeeSignature": "text"\ }\ ], "functionCall": "text", "widgetFee": { "signer": "text", "feeRecipient": "text", "feeRate": 1 }, "widgetFeeSignature": "text", "recipient": "text", "calldata": "text", "amountIn": "text", "amountOut": "text", "toWrap": true, "toUnwrap": true, "fallbackSwapDataArray": [\ "text"\ ], "tokenTransferFeeOnPercent": 1, "txRequest": { "target": "text", "calldata": "text", "value": "text" }, "source": "p0", "errorMessage": "text", "router_version": "text", "gasCostUsd": 1, "estimateDuration": 1, "bridge": {}, "amountInOffset": 1, "amountOutMinimumOffset": 1 } sun-brightdesktopmoon --- # Error Handling | Native Documentation [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/error-handling#error-handling) Error Handling -------------------------------------------------------------------------------------------------------------------------------------------------------------------- Requests with application or business logic errors will return with an HTTP code of 200, but with additional fields for error code and message. For example: Copy { "code": 171008, "message": "Internal Server Error" } { "code": 171018, "message": "expire time exceeds global limit 120s" } To verify the response status, please check `success` bool, or if `code` is present in the response. circle-info Please note that for endpoints that typically return an array, when they encounter an error, the response will be in object format, for example /orderbook. [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/error-handling#error-codes) Error Codes -------------------------------------------------------------------------------------------------------------------------------------------------------------- The list of most common error codes returned by Swap APIs. For other unknown errors, please reach out to Native team members via existing channel. 301016 405030 quote invalid, risk management checks failed The quote provided by the underlying private market maker is rejected by Native's risk managment system to protect swapper/taker. This is usually caused by sudden, violent market movements and should never be persistent. Simply try again after a few seconds of cooldown. 101010 quoted amount exceeds maximum available The quoting amount exceeds the maximum available liquidity/depth represented by levels in the `/orderbook` endpoint. Please always refer to the up-to-date `/orderbook` results while quoting. And quote within the available depth. 171037 orderbook empty for quoted trade The quoting trade currently has 0 available liquidity/depth, and is removed from the `/orderbook` endpoint. Please always refer to the latest `/orderbook` results for quoting. Please always refer to the up-to-date `/orderbook` results while quoting. And only quote existing orderbooks. 171011 requested pair not found The requested pair is not supported by Native and can’t be found. Refer to `/orderbook` results while quoting. And only quote existing orderbooks. Or contact Native to enable AMM fallback. 171015 quoted token not available The requested quote/buying token is not available. Refer to `/orderbook` results while quoting. And only quote existing orderbooks. Or contact Native to enable AMM fallback. 101007 quoted pair not available, empty orderbook The quoting trade currently has 0 available liquidity/depth, and is removed from the `/orderbook` endpoint. Please always refer to the latest `/orderbook` results for quoting. Please always refer to the up-to-date `/orderbook` results while quoting. And only quote existing orderbooks. 131003 failed to parse parameters Issues with input parameters. Usually due to incorrect formats. Check input format. Avoid passing floats in unsupported params like `amount_wei` or `timeout_millis` 131004 invalid parameter Issues with input parameters. Usually due to input conflicts. Try avoid using duplicated params together like `amount` and `amount_wei` 131011 front key version required `version` is required when calling Native’s public UI apiKey. Note that version must be ≥ 3. Use `version=3` or above while quoting. 171018 expire time exceeds global limit 120s The requested `expiry` should not exceed 120s. Remove or pass `expiry_time` that is smaller than 120, recommend using 60 globally. 171053 fee bps exceeds limit 300 The commission fee should not exceed 300 bps. Adjust `fee` to be 300 or lower. 131005 chain parameters invalid Missing `chain` input. Refer to [Networks](https://docs.native.org/native-dev/resources/networks) for supported networks. And use small-caps, standardised chain names. 201001 auth get api key is invalid Auth error. Use correct api key. 201005 rate reach limit Rate limit is hit. Reduce traffic. [PreviousMiscellaneouschevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous) [NextCompose with AMMchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/compose-with-amm) Last updated 2 months ago * [Error Handling](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/error-handling#error-handling) * [Error Codes](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/error-handling#error-codes) sun-brightdesktopmoon sun-brightdesktopmoon --- # Market Makers | Native Documentation [MM Pricing and Signing APIchevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api) [Native Market Makers APIchevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api) [PreviousFor General Assetschevron-left](https://docs.native.org/native-dev/build-with-native/asset-issuers/for-general-assets) [NextMM Pricing and Signing APIchevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api) Last updated 7 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # GET Transaction status | Native Documentation ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-transaction-status#get-swap-api-v2-v1-bridge-tx-status) /bridge/tx-status get https://v2.api.native.org/swap-api-v2/v1/bridge/tx-status Check the status of a bridging request Query parameters bridge\_quote\_idstringRequired Unique identifier for the bridging request. This should match the quoteId in the response of /bridge/firm-quote. Header parameters api\_keystringRequired The API key that was assigned to you by Native Responses chevron-right 200 Successful response containing the status of the bridging request application/json tx\_statusstring · enumOptional Status of the bridging transaction. USER\_REQUESTED: Requested Firm-Quote but not submitted. USER\_COMMITTED: Order inited on source chain. MM\_FAILED: Failed to fill order on destination chain. MM\_FILLED: Order filled on destination chain. CLAIMED: Order wrapped up on source chain. REFUNDED: Order refunded on source chain. Possible values: `USER_REQUESTED``USER_COMMITTED``MM_FAILED``MM_FILLED``CLAIMED``REFUNDED` get /swap-api-v2/v1/bridge/tx-status HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Successful response containing the status of the bridging request [PreviousGET Transaction historychevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-transaction-history) [NextMiscellaneouschevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous) Last updated 3 months ago sun-brightdesktopmoon Copy GET /swap-api-v2/v1/bridge/tx-status?bridge_quote_id=text HTTP/1.1 Host: v2.api.native.org api_key: text Accept: */* Copy { "tx_status": "USER_REQUESTED" } sun-brightdesktopmoon --- # Business Source License | Native Documentation The Native V2 source code is protected under a Business Source License (BSL), which strictly prohibits its use for any commercial or production purposes until December 31st, 2028. Until this date, any attempt to use, deploy or replicate this code in a commercial setting will be in direct violation of this license. After the stipulated period, the license will transition to an Open Source License, allowing the code to be forked and utilized, but with the crucial stipulation that it must remain open source. This means that while the code will eventually be free to use, any derivative work must also be kept open and accessible to the public, ensuring that the spirit of open-source collaboration is maintained and preventing any proprietary exploitation. **Business Source License 1.1** License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved. "Business Source License" is a trademark of MariaDB Corporation Ab. * * * **Parameters** Licensor: Native Technology Limited Licensed Work: Native V2 The Licensed Work is © 2025 Native Technology Limited Additional Use Grant: None Change Date: 2028-12-31 Change License: GNU General Public License v2.0 * * * **Terms** The Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work. The Licensor may make an Additional Use Grant, above, permitting limited production use. Effective on the Change Date, or the fourth anniversary of the first publicly available distribution of a specific version of the Licensed Work under this License, whichever comes first, the Licensor hereby grants you rights under the terms of the Change License, and the rights granted in the paragraph above terminate. If your use of the Licensed Work does not comply with the requirements currently in effect as described in this License, you must purchase a commercial license from the Licensor, its affiliated entities, or authorized resellers, or you must refrain from using the Licensed Work. All copies of the original and modified Licensed Work, and derivative works of the Licensed Work, are subject to this License. This License applies separately for each version of the Licensed Work and the Change Date may vary for each version of the Licensed Work released by Licensor. You must conspicuously display this License on each original or modified copy of the Licensed Work. If you receive the Licensed Work in original or modified form from a third party, the terms and conditions set forth in this License apply to your use of that work. Any use of the Licensed Work in violation of this License will automatically terminate your rights under this License for the current and all other versions of the Licensed Work. This License does not grant you any right in any trademark or logo of Licensor or its affiliates (provided that you may use a trademark or logo of Licensor as expressly required by this License). TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON- INFRINGEMENT, AND TITLE. MariaDB hereby grants you permission to use this License’s text to license your works, and to refer to it using the trademark "Business Source License", as long as you comply with the Covenants of Licensor below. * * * **Covenants of Licensor** In consideration of the right to use this License’s text and the “Business Source License” name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor: 1. To specify as the Change License the GPL Version 2.0 or any later version, or a license that is compatible with GPL Version 2.0 or a later version, where “compatible” means that software provided under the Change License can be included in a program with software provided under GPL Version 2.0 or a later version. Licensor may specify additional Change Licenses without limitation. 2. To either: (a) specify an additional grant of rights to use that does not impose any additional restriction on the right granted in this License, as the Additional Use Grant; or (b) insert the text “None”. 3. To specify a Change Date. 4. Not to modify this License in any other way. * * * **Notice** The Business Source License (this document, or the "License") is not an Open Source license. However, the Licensed Work will eventually be made available under an Open Source License, as stated in this License. [PreviousAnalyticschevron-left](https://docs.native.org/native-dev/resources/analytics) [NextMedia Kitchevron-right](https://docs.native.org/native-dev/resources/media-kit) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Analytics | Native Documentation [hashtag](https://docs.native.org/native-dev/resources/analytics#defillama) DefiLlama ------------------------------------------------------------------------------------------ [![Logo](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2Fdefillama.com%2Ffavicon.ico&width=20&dpr=3&quality=100&sign=69d58bd2&sv=2)Native DEX Trading Volume & Stats - DefiLlamaDefiLlamachevron-right](https://defillama.com/protocol/dexs/native) [hashtag](https://docs.native.org/native-dev/resources/analytics#dune) Dune -------------------------------------------------------------------------------- [![Logo](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2Fdune.com%2Fassets%2Fapple-touch-icon.png&width=20&dpr=3&quality=100&sign=65052a05&sv=2)\[V2\] Native Main Dashboard | DuneDunechevron-right](https://dune.com/native_fi/native-dashboard) [hashtag](https://docs.native.org/native-dev/resources/analytics#coingecko) CoinGecko ------------------------------------------------------------------------------------------ #### [hashtag](https://docs.native.org/native-dev/resources/analytics#ethereum) Ethereum [https://www.coingecko.com/en/exchanges/nativearrow-up-right](https://www.coingecko.com/en/exchanges/native) #### [hashtag](https://docs.native.org/native-dev/resources/analytics#bsc) Bsc [https://www.coingecko.com/en/exchanges/native-bscarrow-up-right](https://www.coingecko.com/en/exchanges/native-bsc) #### [hashtag](https://docs.native.org/native-dev/resources/analytics#arbitrum) Arbitrum [https://www.coingecko.com/en/exchanges/native-arbitrumarrow-up-right](https://www.coingecko.com/en/exchanges/native-arbitrum) #### [hashtag](https://docs.native.org/native-dev/resources/analytics#base) Base [https://www.coingecko.com/en/exchanges/native-basearrow-up-right](https://www.coingecko.com/en/exchanges/native-base) [PreviousAuditschevron-left](https://docs.native.org/native-dev/resources/audits) [NextBusiness Source Licensechevron-right](https://docs.native.org/native-dev/resources/business-source-license) Last updated 7 months ago * [DefiLlama](https://docs.native.org/native-dev/resources/analytics#defillama) * [Dune](https://docs.native.org/native-dev/resources/analytics#dune) * [CoinGecko](https://docs.native.org/native-dev/resources/analytics#coingecko) sun-brightdesktopmoon sun-brightdesktopmoon --- # GET Indicative quote | Native Documentation ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-indicative-quote#get-swap-api-v2-v1-bridge-indicative-quote) /bridge/indicative-quote get https://v2.api.native.org/swap-api-v2/v1/bridge/indicative-quote Request fast, indicative quote for a bridging request without the calldata. Query parameters from\_addressstringOptional Address of the user requesting the indicative quote Pattern: `^0x[a-fA-F0-9]{40}$` src\_chainstring · enumRequired Blockchain name of the chain to initiate bridging, eg: ethereum, arbitrum, ... (refer to network name reference) Possible values: `ethereum``bsc``arbitrum``base` dst\_chainstring · enumRequired Blockchain name of the chain to receive bridged tokens, eg: ethereum, arbitrum, ... (refer to network name reference) Possible values: `ethereum``bsc``arbitrum``base` token\_instringRequired Address of the token to be sold/bridge-out Pattern: `^0x[a-fA-F0-9]{40}$` token\_outstringRequired Address of the token to be bought/bridge-in Pattern: `^0x[a-fA-F0-9]{40}$` amountstringRequired The amount of `token_in` token to pay/sell/bridge-out versionstringOptional The version of Native Swap Router (if bridging includes token swaps). Leave empty or use 4 (latest) Header parameters api\_keystringRequired The API key that was assigned to you by Native Responses chevron-right 200 Successful response containing indicative quote for a bridging request application/json successbooleanOptional Indicates whether the request was successful buyerTokenstringOptional Address of the token being bought/bridge-in Pattern: `^0x[a-fA-F0-9]{40}$` sellerTokenstringOptional Address of the token being sold/bridge-out Pattern: `^0x[a-fA-F0-9]{40}$` buyerTokenAmountnumber · doubleOptional Amount of buyer token (in token units) buyerTokenAmountWeistringOptional Amount of buyer token (in wei) sellerTokenAmountnumber · doubleOptional Amount of seller token (in token units) sellerTokenAmountWeistringOptional Amount of seller token (in wei) pricenumber · doubleOptional Price of the quote widgetFeeUsdnumber · doubleOptional Widget fee in USD liquidityProviderFeeUsdnumber · doubleOptional Liquidity provider fee in USD totalFeeUsdnumber · doubleOptional Total fee in USD routesstring\[\]Optional Array of route token symbols sourceinteger · int32\[\]Optional Source identifiers for the quote prioritystring · enumOptional Bridging confirm speed. Fast orders will be confirmed in no longer than 10 seconds. Slow orders can take up to 3 mins. Possible values: `fast``slow` get /swap-api-v2/v1/bridge/indicative-quote HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Successful response containing indicative quote for a bridging request [PreviousCrossChain Swap APIchevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api) [NextGET Firm quotechevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-firm-quote) Last updated 3 months ago sun-brightdesktopmoon Copy GET /swap-api-v2/v1/bridge/indicative-quote?src_chain=ethereum&dst_chain=ethereum&token_in=text&token_out=text&amount=text HTTP/1.1 Host: v2.api.native.org api_key: text Accept: */* Copy { "success": true, "buyerToken": "text", "sellerToken": "text", "buyerTokenAmount": 1, "buyerTokenAmountWei": "text", "sellerTokenAmount": 1, "sellerTokenAmountWei": "text", "price": 1, "widgetFeeUsd": 1, "liquidityProviderFeeUsd": 1, "totalFeeUsd": 1, "routes": [\ "text"\ ], "source": [\ 1\ ], "priority": "fast" } sun-brightdesktopmoon --- # Media Kit | Native Documentation [hashtag](https://docs.native.org/native-dev/resources/media-kit#native-icon-logo) Native icon logo -------------------------------------------------------------------------------------------------------- Icon Logo - Black with white background (svg) ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252F22HDuJqTgqIjpd6aPMKM%252FBlack%2520logo%2520without%2520words%2520with%2520black%2520bg.svg%3Falt%3Dmedia%26token%3D66671405-4908-4f29-868a-ae97ddc92c60&width=768&dpr=3&quality=100&sign=1fccafae&sv=2) Icon Logo - White with black background (svg) ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FxO4SYMkcetuMCqwTNP2f%252FWhite%2520logo%2520without%2520words%2520with%2520black%2520bg.svg%3Falt%3Dmedia%26token%3D105e4510-b393-4699-906c-80d59dad5bbd&width=768&dpr=3&quality=100&sign=6118122&sv=2) Icon Logo - Black with transparent background ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252F5as3jtUXv4Fz9e7EErBm%252FNative_logo_only_black_on_transparent.png%3Falt%3Dmedia%26token%3D2a8ef5a9-d591-4b65-afcf-64094dcbce6d&width=768&dpr=3&quality=100&sign=b26e5995&sv=2) Icon Logo - White with transparent background ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FnOIsHmN0f9KHJdyGh3jY%252FNative_logo_only_white_on_transparent.png%3Falt%3Dmedia%26token%3D79effb6a-a78f-4571-9ebc-951321f865ec&width=768&dpr=3&quality=100&sign=a381b6e7&sv=2) [hashtag](https://docs.native.org/native-dev/resources/media-kit#native-text-logo) Native text logo -------------------------------------------------------------------------------------------------------- Text Logo - Black with transparent background ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FdVmKVqVHEhRlGJ7ZuBn3%252FNative_black_on_transparent.png%3Falt%3Dmedia%26token%3D56fb0e89-5367-4e2d-b0dd-8a5b6a593311&width=768&dpr=3&quality=100&sign=9e6a882c&sv=2) Text Logo - Colour white with transparent background ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252Fu2nLISZkqZz3Fd6ngiSo%252FNative_colour_on_transparent.png%3Falt%3Dmedia%26token%3Dd6af9a81-1b9c-4583-8ea7-ada1b8abee6e&width=768&dpr=3&quality=100&sign=b5f05c42&sv=2) Text Logo - White with black background ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252FVNvaQy61IqYOQmfJOHxr%252FNative_white_on_black.png%3Falt%3Dmedia%26token%3D6e82def1-8c98-4b54-9c35-7453b7b5409d&width=768&dpr=3&quality=100&sign=79e743a6&sv=2) Text Logo - Black with white background ![](https://docs.native.org/native-dev/~gitbook/image?url=https%3A%2F%2F2236132028-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fta4g2TwHaleDMaDKVgwR%252Fuploads%252Fr1TnzWI8Z8jCHYOs2rpE%252FNative_black_on_white.png%3Falt%3Dmedia%26token%3D68ecfb18-c389-4fc9-b878-7e8d710868f5&width=768&dpr=3&quality=100&sign=a8284903&sv=2) [PreviousBusiness Source Licensechevron-left](https://docs.native.org/native-dev/resources/business-source-license) [NextContactchevron-right](https://docs.native.org/native-dev/resources/contact) Last updated 22 days ago * [Native icon logo](https://docs.native.org/native-dev/resources/media-kit#native-icon-logo) * [Native text logo](https://docs.native.org/native-dev/resources/media-kit#native-text-logo) sun-brightdesktopmoon sun-brightdesktopmoon --- # Addresses | Native Documentation circle-exclamation NativeRouter V1 and V2 is deprecated and no longer recommended. ### [hashtag](https://docs.native.org/native-dev/resources/addresses#ethereum-mainnet) Ethereum Mainnet Contract Address NativeRouter V4 0x8a2ddc0461Fcf96F81a05529Bed540d4f1eb2a00 NativeRouter V3 0xa540ec8C73322200d68E1B86c471A5C850854f22 CreditVault 0xe3D41d19564922C9952f692C5Dd0563030f5f2EF NativeBridge 0xceBFC5dFBD5CE21694fe2ACefa63aD6f828831d2 ### [hashtag](https://docs.native.org/native-dev/resources/addresses#bnb-smart-chain) BNB Smart Chain Contract Address NativeRouter V4 0xF064b069Ed18Eb5c61159247C55C5af79B28a968 NativeRouter V3 0x0f9f2366C6157F2aCD3C2bFA45Cd9031c152D2Cf CreditVault 0xBA8dB0CAf781cAc69b6acf6C848aC148264Cc05d NativeBridge 0x5B933868f5e710070b146213ED2Cd71628E465C1 ### [hashtag](https://docs.native.org/native-dev/resources/addresses#arbitrum) Arbitrum Contract Address NativeRouter V4 0x0FC85a171bD0b53BF0bBace74F04B66170Ae3eAb NativeRouter V3 0x7d1c4889DF6113B3e4581a8c0484374bdeC3341B CreditVault 0xbA1cf8A63227b46575AF823BEB4d83D1025eff09 NativeBridge 0x5E65CEa5473fC8977e4DfDe940B2A99a439181cA ### [hashtag](https://docs.native.org/native-dev/resources/addresses#base) Base Contract Address NativeRouter V4 0xaEC634d949df14Be76dC317504C7b9a6a8A5f576 NativeRouter V3 0xd547727b926648Af3F31DbB89E3B93E49F78dCb8 CreditVault 0x74a4Cd023e5AfB88369E3f22b02440F2614a1367 NativeBridge 0xA11f7CdE7402093FF4D24A91FD8cdcc8AA0c96A8 [PreviousPOST Collateral removal statuschevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-collateral-removal-status) [NextNetworkschevron-right](https://docs.native.org/native-dev/resources/networks) Last updated 18 days ago * [Ethereum Mainnet](https://docs.native.org/native-dev/resources/addresses#ethereum-mainnet) * [BNB Smart Chain](https://docs.native.org/native-dev/resources/addresses#bnb-smart-chain) * [Arbitrum](https://docs.native.org/native-dev/resources/addresses#arbitrum) * [Base](https://docs.native.org/native-dev/resources/addresses#base) sun-brightdesktopmoon sun-brightdesktopmoon --- # For Pegged Assets | Native Documentation A [prime examplearrow-up-right](https://medium.com/@official_42951/pioneering-a-new-era-of-liquidity-stakestone-x-native-90d401002319) is Native's collaboration with StakeStone, where we successfully solved the liquidity issue for STONE. Native V2 ensures tokens like **STONE** achieve sufficient liquidity to be accepted by leading DeFi protocols including lending protocols, yield trading platform and oracles. By building robust on-chain liquidity through its credit pool model, Native V2 unlocks the following benefits: #### [hashtag](https://docs.native.org/native-dev/build-with-native/asset-issuers/for-pegged-assets#effective-lp-incentives) **Effective LP Incentives** * By leveraging liquidity in the credit pool, Native V2 boosts **TVL**, demonstrating a token’s viability and security. * With [Liquidity Paring](https://docs.native.org/native-dev/concepts/liquidity-pairing) mechanism and [single-sided LP](https://docs.native.org/native-dev/concepts/single-sided-liquidity-pools) provision, asset issuers save half of the cost of AMM LP incentives on Native. * Example: Tokens with **$10M+** [**Total Available Liquidity**](https://docs.native.org/native-dev/concepts/total-available-liquidity) are more likely to meet benchmarks of lending protocols like **Morpho**. #### [hashtag](https://docs.native.org/native-dev/build-with-native/asset-issuers/for-pegged-assets#trading-volume) **Trading Volume** * Enabled liquidity facilitates significant trading volume, ensuring strong market activity and price stability. * Example: Tokens achieving **$5M+ daily trading volume** are far more likely to meet benchmarks of oracles like **Chainlink**. #### [hashtag](https://docs.native.org/native-dev/build-with-native/asset-issuers/for-pegged-assets#price-slippage) **Price Slippage** * With a contractual rate, PMM network on Native can ensure a customized pricing range for the listed asset. * Example: Tokens within **0.5% slippage** are more likely to meet the benchmarks of yield trading platform like **Pendle**. However, this is just one way to collaborate with Native V2 — we're open to exploring other partnership opportunities as well. circle-info Fill out this [formarrow-up-right](https://docs.google.com/forms/d/e/1FAIpQLSdyOZGlRzB9A31qh-ryrqdHlSpJDPz-lTDqZ8t40e19WHQyTw/viewform) , and the Native team will be in touch. [PreviousAsset Issuerschevron-left](https://docs.native.org/native-dev/build-with-native/asset-issuers) [NextFor General Assetschevron-right](https://docs.native.org/native-dev/build-with-native/asset-issuers/for-general-assets) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Audits | Native Documentation Native's contracts have been audited and will continue to undergo regular audits. Below is a list of all contract audits to date: Contract Audited by In Link Native wNLP, Pendle SY [WatchPugarrow-up-right](https://www.watchpug.org/) Oct, 2025 [Linkarrow-up-right](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fta4g2TwHaleDMaDKVgwR%2Fuploads%2FLeVxGNxqMaI9b0Jtikux%2FNative_PendleNativeLPSY_Audit_Report_by_WatchPug.pdf?alt=media&token=d336442c-ebad-433d-b6e2-ebd06d8ef6f4) Native's V2 Core Smart Contract [Sherlockarrow-up-right](https://www.sherlock.xyz/) June, 2025 [Linkarrow-up-right](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fta4g2TwHaleDMaDKVgwR%2Fuploads%2F4AzmcJJ2mjjuznQA30nS%2F2025.06.18%20-%20Final%20-%20native%20Private%20Bug%20Bounty%20Audit%20Report.pdf?alt=media&token=1ec99547-9ff4-4f86-88a2-942647028a9d) Native's V2 Core Smart Contract [Quantstamparrow-up-right](https://quantstamp.com/) January, 2025 [Linkarrow-up-right](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fta4g2TwHaleDMaDKVgwR%2Fuploads%2FBIa5rllzsBWJ3y7fGicH%2FQuantstamp-Audit-Report-Native-V2.pdf?alt=media&token=8208cf9f-db35-4025-a572-1ca0b0f7caa9) Native Credit Pool smart contract [Halbornarrow-up-right](https://www.halborn.com/) April, 2024 [Linkarrow-up-right](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fta4g2TwHaleDMaDKVgwR%2Fuploads%2Fy74TpGvBHzpRiakXs7wy%2FNative%20Audit%20-%20Halborn.pdf?alt=media&token=84b271af-f04a-4ce2-819a-b4dfbdd3c6dc) Native Credit Pool smart contract [Veridisearrow-up-right](https://veridise.com/) March, 2024 [Linkarrow-up-right](https://2554447728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1KSTkRlEw1XexgySFans%2Fuploads%2FWCaQWlFu2OvUPPhd1ayY%2FVeridise.pdf?alt=media&token=871acece-a250-40c3-9330-556426ec5ad1) Native Credit Pool smart contract [Salusarrow-up-right](https://salusec.io/) February, 2024 [Linkarrow-up-right](https://2554447728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1KSTkRlEw1XexgySFans%2Fuploads%2Fxduwjo5uN8PMjy7lz3UL%2FSalus.pdf?alt=media&token=dea049c7-88f6-4767-8f5e-d494a09bfff4) Native’s V1.1 smart contract [Symbolic Softwarearrow-up-right](https://symbolic.software/security/) August, 2023 [Linkarrow-up-right](https://symbolic.software/pdf/nat-001.pdf) Native’s V1 Smart Contract [Omnisciaarrow-up-right](https://omniscia.io/) February, 2023 [Linkarrow-up-right](https://omniscia.io/reports/native-defi-exchange-63e26ceefed14e001649b91b/) file-pdf 1MB [Quantstamp-Audit-Report-Native-V2.pdf](https://2236132028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fta4g2TwHaleDMaDKVgwR%2Fuploads%2FBIa5rllzsBWJ3y7fGicH%2FQuantstamp-Audit-Report-Native-V2.pdf?alt=media&token=8208cf9f-db35-4025-a572-1ca0b0f7caa9) PDF downloadDownload[arrow-up-right-from-squareOpen](https://2236132028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fta4g2TwHaleDMaDKVgwR%2Fuploads%2FBIa5rllzsBWJ3y7fGicH%2FQuantstamp-Audit-Report-Native-V2.pdf?alt=media&token=8208cf9f-db35-4025-a572-1ca0b0f7caa9) file-pdf 1017KB [2025.06.18 - Final - Native Private Bug Bounty.pdf](https://2236132028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fta4g2TwHaleDMaDKVgwR%2Fuploads%2F4AzmcJJ2mjjuznQA30nS%2F2025.06.18%20-%20Final%20-%20native%20Private%20Bug%20Bounty%20Audit%20Report.pdf?alt=media&token=1ec99547-9ff4-4f86-88a2-942647028a9d) PDF downloadDownload[arrow-up-right-from-squareOpen](https://2236132028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fta4g2TwHaleDMaDKVgwR%2Fuploads%2F4AzmcJJ2mjjuznQA30nS%2F2025.06.18%20-%20Final%20-%20native%20Private%20Bug%20Bounty%20Audit%20Report.pdf?alt=media&token=1ec99547-9ff4-4f86-88a2-942647028a9d) file-pdf 88KB [Native\_PendleNativeLPSY\_Audit\_Report\_by\_WatchPug.pdf](https://2236132028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fta4g2TwHaleDMaDKVgwR%2Fuploads%2FLeVxGNxqMaI9b0Jtikux%2FNative_PendleNativeLPSY_Audit_Report_by_WatchPug.pdf?alt=media&token=d336442c-ebad-433d-b6e2-ebd06d8ef6f4) PDF downloadDownload[arrow-up-right-from-squareOpen](https://2236132028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fta4g2TwHaleDMaDKVgwR%2Fuploads%2FLeVxGNxqMaI9b0Jtikux%2FNative_PendleNativeLPSY_Audit_Report_by_WatchPug.pdf?alt=media&token=d336442c-ebad-433d-b6e2-ebd06d8ef6f4) [hashtag](https://docs.native.org/native-dev/resources/audits#bug-bounty) Bug bounty ----------------------------------------------------------------------------------------- [https://immunefi.com/bug-bounty/native/information/immunefi.comchevron-right](https://immunefi.com/bug-bounty/native/information/) [PreviousNetworkschevron-left](https://docs.native.org/native-dev/resources/networks) [NextAnalyticschevron-right](https://docs.native.org/native-dev/resources/analytics) Last updated 4 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Networks | Native Documentation Network Standardised Chain Name Ethereum Mainnet `ethereum` BNB Chain `bsc` Arbitrum One `arbitrum` Base `base` In [FirmQuote Swap APIs](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis) , chain parameters must be passed with **small-caps** standardised chain name. [PreviousAddresseschevron-left](https://docs.native.org/native-dev/resources/addresses) [NextAuditschevron-right](https://docs.native.org/native-dev/resources/audits) Last updated 5 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Blacklisting | Native Documentation To protect LP, malicious arbitrage that puts Native liquidity at risk will be profiled, and the user/swapper address will be added to the blacklist. To avoid producing additional errors during the /firm-quote stage, any quotes submitted with `from_address` or `beneficiary_address` being blacklisted will be subject to a 50bps added spread due to increased risk. We recommend that all upstreams query and cache a copy of the latest blacklisted address and apply pre-processing and filtering. #### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/blacklisting#blacklist-endpoint) /blacklist Endpoint Copy ## Request curl "https://v2.api.native.org/swap-api-v2/v1/blacklist?page_size=200&page_index=1" \ -H "apiKey: $NATIVE_KEY" Param: * page\_size: entries per page, max 500 * page\_index: page index Normal return: Copy { "black_list": [ // latest first\ {\ "id": "466221",\ "address": "0x000000000000000000000000000000000000dead", // address\ "chainId": 1,\ "createTime": 1775026096 // unix timestamp\ }\ ], "total_count": 44233 // total entires count } Upstream must contact the Native team with the existing communication channel to request permission for this endpoint. No permission return: [PreviousAMM Fallbackchevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/amm-fallback) [NextCrossChain Swap APIchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api) Last updated 2 days ago sun-brightdesktopmoon Copy { "code": 201009, "message": "no auth to call" } sun-brightdesktopmoon --- # CrossChain Swap API | Native Documentation [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api#overview) Overview --------------------------------------------------------------------------------------------------------------------------- The Native Bridge API enables seamless cross-chain token bridging and swapping across multiple blockchain networks, utilising the same reliable Native Swap Engine and Native Credit Pool for superb pricing and performance. [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api#endpoints) Endpoints ----------------------------------------------------------------------------------------------------------------------------- Our API enables users to fetch cross-chain bridge quotes, generate transaction data for executing on-chain bridge transactions via Native's infrastructure, and manage their bridging lifecycle. The intelligent routing algorithm ensures users receive the best possible market prices for optimal cross-chain trading outcomes. * **Indicative quote**: Use `GET /bridge/indicative-quote` to obtain fast, indicative quotes for bridging tokens across chains. This endpoint provides pricing information without generating calldata, making it ideal for displaying estimated rates to users before they commit to a transaction. * **Firm quote**: Use `GET /bridge/firm-quote` to obtain executable transaction data necessary to initiate cross-chain bridge transactions. This endpoint returns the complete calldata, target contract address, and all necessary parameters for executing the bridge transaction on the source chain. * **Transaction status**: Use `GET /bridge/tx-status` to check the current status of a bridging transaction. This endpoint allows you to monitor the progress of your bridge request from initiation through completion, refund, or claim. * **Transaction history**: Use `GET /bridge/tx-history` to retrieve a paginated list of all bridge transactions for a specific user address. This endpoint enables users to view their complete bridging history across different chains. * **Refund**: Use `GET /bridge/refund` to request a refund for a bridging transaction that has failed or cannot be completed. This endpoint initiates the refund process for tokens that were locked but not successfully bridged. [PreviousBlacklistingchevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/blacklisting) [NextGET Indicative quotechevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-indicative-quote) Last updated 3 months ago * [Overview](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api#overview) * [Endpoints](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api#endpoints) sun-brightdesktopmoon sun-brightdesktopmoon --- # Contact | Native Documentation ### [hashtag](https://docs.native.org/native-dev/resources/contact#business) Business * For partner integrations, reach out using the form: [https://forms.gle/12LaH1JQyhZqBHqw9arrow-up-right](https://forms.gle/12LaH1JQyhZqBHqw9) * For generic inquires, please reach out to: [\[email protected\]](https://docs.native.org/cdn-cgi/l/email-protection) ### [hashtag](https://docs.native.org/native-dev/resources/contact#retail) Retail * Join our Discord community: [https://discord.com/invite/yxYmusrvnKarrow-up-right](https://discord.com/invite/yxYmusrvnK) * Follow us on X/Twitter: [https://twitter.com/native\_fiarrow-up-right](https://twitter.com/native_fi) ### [hashtag](https://docs.native.org/native-dev/resources/contact#partnered-support-channel) Partnered Support Channel * For users from Binance Earn Campaign, support is available via Telegram group: [https://t.me/NativeBNwalletEarnSupportarrow-up-right](https://t.me/NativeBNwalletEarnSupport) [PreviousMedia Kitchevron-left](https://docs.native.org/native-dev/resources/media-kit) Last updated 15 days ago * [Business](https://docs.native.org/native-dev/resources/contact#business) * [Retail](https://docs.native.org/native-dev/resources/contact#retail) * [Partnered Support Channel](https://docs.native.org/native-dev/resources/contact#partnered-support-channel) sun-brightdesktopmoon sun-brightdesktopmoon --- # Miscellaneous | Native Documentation [Error Handlingchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/error-handling) [Minimum Bridge To Amountchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/minimum-bridge-to-amount) [PreviousGET Transaction statuschevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-transaction-status) [NextError Handlingchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/error-handling) sun-brightdesktopmoon sun-brightdesktopmoon --- # Compose with AMM | Native Documentation ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/compose-with-amm#flexible-input-amount) Flexible Input Amount Since AMM swaps’ output amount is only fixed upon onchain execution, Native RFQ is designed to handle flexible input (+10% or -50% of the original quoted input amount) to felicitate multi-hop routing with AMMs or other liquidity sources. You may also use this feature to perform: over-quote then under-fill in some solving cases. To utilise this feature, there are two `uint256` in the final `tradeRFQT` interface: * `actualSellerAmount` * `actualMinOutputAmount` By default they are `0`. Meaning the Native Router will execute the order with the exact input amount quoted. If the balance in your caller address is lower, the call will revert due to insufficient balance. This is common when the previous hop is AMM and the output amount is impacted by slippage. To avoid this, simply override the `actualSellerAmount` in the contract logic when executing the call. You may choose to leave `actualMinOutputAmount` as 0. Native Router should automatically adapt based on the original quoted slippage control parameter. circle-exclamation Please note that in some rare cases, when the actual amount is greater than the original quoted amount, the Native Credit Pool may fail to facilitate the swap. As the actual amount is now larger than the original quote. Being unexpected by the Native quoting backend. ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/compose-with-amm#locate-the-parameters) Locate the Parameters To locate the parameters in calldata you may decode the call using the Native Router ABI (all are verified on explorers.) Or, using two fields in `/firm-quote` return: * `amountInOffset` * `amountOutMinimumOffset` They indicate the offset position (in bytes) of the `actualSellerAmount` and `actualMinOutputAmount` parameter within the returned calldata. ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/compose-with-amm#examples) Examples #### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/compose-with-amm#swap-tx-examples) Swap Tx Examples * Native Swap without actual amount override: [Simulated Transaction | Tenderlyarrow-up-right](https://www.tdly.co/shared/simulation/4f93cb05-e1f6-487f-930b-b6ef2e28c319) * The same Native Swap but with actual amount override: [Simulated Transaction | Tenderlyarrow-up-right](https://www.tdly.co/shared/simulation/92009070-2de3-4b27-b27e-21b7bf205da4) `4629988946865908500000` → `4167453051074000000000` (-9.99% underfill) #### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/compose-with-amm#parameters-locating-example) Parameters Locating Example From this decoded swap tx: [https://www.tdly.co/shared/simulation/a378d5e6-f3d4-439d-a203-798c94c05136arrow-up-right](https://www.tdly.co/shared/simulation/a378d5e6-f3d4-439d-a203-798c94c05136) We see the override value being `73684281000000000000`. From `/firm-quote` the `amountInOffset` is `36`. According to the offset value we may extract the encoded data from location 72 to 136 (64 characters), excluding the leading `0x`. The extracted value is `000000000000000000000000000000000000000000000003fe93272c67109000` which is representing the `actualSellerAmount` value `73684281000000000000` [PreviousError Handlingchevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/error-handling) [NextNative Tokens Supportchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/native-tokens-support) Last updated 5 months ago * [Flexible Input Amount](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/compose-with-amm#flexible-input-amount) * [Locate the Parameters](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/compose-with-amm#locate-the-parameters) * [Examples](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/compose-with-amm#examples) sun-brightdesktopmoon sun-brightdesktopmoon --- # Firm-Quote | Native Documentation Based on the order book you provide, our router will determine the optimal liquidity source to offer the best price. If your pricing is selected, Native will request a firm quote from you. The firm quote endpoint must adhere to the following format: ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/firm-quote#endpoint) **Endpoint** Copy GET /firm-quote ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/firm-quote#params) **Params** Name Description `sellerTokenAmount` The token input amount of the order, in wei `chainId` Chain ID of the network (e.g., 1 for Ethereum, 56 for BSC) `sellerToken` The ERC20 token address that will be sent to the market maker `buyerToken` The ERC20 token address that will be received from the market maker `pool` Native pool contract address that will execute this order. `nativePool` The Native Rfq Pool address that execute the trade. `quoteId` Unique ID for this order request `deadlineTimestamp` Deadline UNIX timestamp specified by the user. You may double-check if the number is acceptable. And choose to reject any quotes with invalid numbers. However, if a Market Maker wishes to set a maximum allowed expiry, please include that in the orderbook endpoint. `feeBps` Fee that Native will charge market makers, factored into their quote. Native collaborates with market makers to track and pay fees off-chain. Contracts with market makers will specify how fees are set and paid, and data sources will be provided for monitoring fee obligations. `availableBorrowBalance` The amount of buyer token Market Makers can borrow from Native Inventory at the moment, in wei #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/firm-quote#example) **Example** Copy /firm-quote?sellerTokenAmount=10000000000000000000000&chainId=97&sellerToken=0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d&buyerToken=0x55d398326f99059ff775485246999027b3197955&nativePool=0xaaE854bdd940cf402d79e8051DC7E3390e32A3ac"eId=62716-206e-41cb-8559-013f1ed1a65a&deadlineTimestamp=1671086729&feeBps=12&availableBorrowBalance=10000000000000000000000 In this example, a user sells **10,000 USDC** to the market maker in exchange for **USDT** on **Binance Smart Chain (BSC)**. ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/firm-quote#response) **Response** You must provide a response in the following format: Name Description `success` Indicates whether you can provide a firm quote for this order flow (true/false) `buyerTokenAmount` The amount of tokens you are exchanging with the seller `deadlineTimestamp` The timestamp when this order will expire, typically 20-30 seconds for execution `errorMessage` Include the reason for the error if `success` is false. #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/firm-quote#example-1) **Example** In the response above, the market maker returns **10,100 USDT** for the order sent in the example. circle-info The Native server is hosted in the AWS Tokyo region, and all market makers are required to respond to all endpoints in 100ms (end-to-end). [PreviousOrderbookchevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/orderbook) [NextSign-Quotechevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote) Last updated 16 days ago * [Endpoint](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/firm-quote#endpoint) * [Params](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/firm-quote#params) * [Response](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/firm-quote#response) sun-brightdesktopmoon Copy { "success": true, "buyerTokenAmount": "10100000000000000000000", "deadlineTimestamp": 1671086729, // Will be passed to sign-quote "errorMessage": "" } sun-brightdesktopmoon --- # Orderbook | Native Documentation To indicate current pricing for Native APIs and aggregators, you must provide a price level endpoint that returns the price levels of all supported pairs on a specified chain. Native will call this endpoint **every second on every supported network** to retrieve the latest price levels. The endpoint must adhere to the following format: ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/orderbook#orderbook-endpoint) Endpoint Copy GET /orderbook ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/orderbook#params) **Params** Name Description `chainId` Chain ID of the blockchain network, in integers. For example: 1 for Ethereum, 56 for BSC. #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/orderbook#example) **Example** Copy /orderbook?chainId=1 ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/orderbook#response) Response You need to provide a response in the following format: **Type:** Array of order pairs Name Description `base_symbol` The symbol of the token you are buying or selling `base_address` The address of the token you are buying or selling `quote_symbol` The symbol of the token that will exchanged for the base token `quote_address` The address of the token that will exchanged for the base token `levels` This is an array of tuples in the format of \[\[int, int\]\]. The value at index 0 is the amount of tokens and the value at index 1 is the price you are willing to transact at. `side` "Ask" or "Bid" Indicates whether you are buying or selling the base token `minimum_in_base` The minimum amount of base tokens that you are willing to transact `max_expiry` (optional) The maximum acceptable expiry time in seconds. Native API will never request a quote with a deadline that exceeds this number. Your liquidity will simply be skipped for this order. #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/orderbook#example-1) **Example** circle-info **Note**: The price levels must be returned in a non-cumulative manner. For example, given the following price levels for the `WETH-USDT` pair: If someone wants to trade 3 WETH for USDT, the price would be calculated as follows: `0.001 * 1600 + 1 * 1610 + 1.999 * 1612 = 4833.988` circle-info The Native server is hosted in the AWS Tokyo region, and all market makers are required to respond to all endpoints in 100ms (end-to-end). [PreviousMM Pricing and Signing APIchevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api) [NextFirm-Quotechevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/firm-quote) Last updated 16 days ago * [Endpoint](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/orderbook#orderbook-endpoint) * [Params](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/orderbook#params) * [Response](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/orderbook#response) sun-brightdesktopmoon Copy [\ {\ "base_symbol": "USDT",\ "base_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",\ "quote_symbol": "AAVE",\ "quote_address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",\ "levels": [\ [\ 278.6807021305324,\ 0.016506345666681244\ ],\ [\ 2883.2639932781804,\ 0.0165090675397643\ ],\ // ... more price levels\ ],\ "side": "ask",\ "minimum_in_base": 0.0001,\ "max_expiry": 60,\ },\ {\ "base_symbol": "AAVE",\ "base_address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",\ "quote_symbol": "USDT",\ "quote_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",\ "levels": [\ [\ 4.6,\ 60.58276133272444\ ],\ [\ 47.6,\ 60.572772968029\ ],\ // ... more price levels\ ],\ "side": "bid",\ "minimum_in_base": 0.0001\ }\ // ... more token pairs\ ] Copy [\ [0.001, 1600],\ [1,1610],\ [2,1612]\ ] sun-brightdesktopmoon --- # Error Handling | Native Documentation [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/error-handling#error-handling) Error Handling -------------------------------------------------------------------------------------------------------------------------------------------------------------------- Requests with application or business logic errors will return with an HTTP code of 200, but with additional fields for error code and message. For example: Copy { "code": 171008, "message": "Internal Server Error" } { "code": 171018, "message": "expire time exceeds global limit 120s" } To verify the response status, please check `success` bool, or if `code` is present in the response. circle-info Please note that for endpoints that typically return an array, when they encounter an error, the response will be in object format. [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/error-handling#error-codes) Error Codes -------------------------------------------------------------------------------------------------------------------------------------------------------------- The list of most common error codes returned by CrossChain Swap APIs. For other unknown errors, please reach out to Native team members via existing channel. 351015 requested amount smaller than token out minimum wei \[xxx\] The buying (bridge to) token amount is too small. Check [Minimum Bridge To Amount](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/minimum-bridge-to-amount) for the minimum amount and avoid bridging orders that are too small. 131003 failed to parse parameters Issues with input parameters. Usually due to incorrect formats. Check input format. Avoid passing floats in unsupported params like `amount_wei` or `timeout_millis` 131004 invalid parameter Issues with input parameters. Usually due to input conflicts or missing params. Check the related API reference to see if any param is duplicated or missing. 201001 auth get api key is invalid Auth error. Use correct api key. 201005 rate reach limit Rate limit is hit. Reduce traffic. [PreviousMiscellaneouschevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous) [NextMinimum Bridge To Amountchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/minimum-bridge-to-amount) Last updated 1 month ago * [Error Handling](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/error-handling#error-handling) * [Error Codes](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/error-handling#error-codes) sun-brightdesktopmoon sun-brightdesktopmoon --- # Sign-Quote | Native Documentation After validating the firm quote, Native will request you to sign the quote, authorizing the swap for the approved amount. The sign quote endpoint must adhere to the following format: ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote#sign-quote-endpoint) Endpoint Copy POST /sign-quote ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote#params) **Params** Name Description `nonce` ID to prevent the transaction from being executed more than once. Incremental for each transaction by `txOrigin` and `pool`. `signer` Public address of the signer who will sign this order `buyerToken` The ERC20 token address that will be received from the market maker `sellerToken` The ERC20 token address that will be sent to the market maker `buyerTokenAmount` The token output amount of the order, in wei. Can be modified by the signer to determine the final output amount. `sellerTokenAmount` The token input amount of the order, in wei `deadlineTimestamp` Deadline UNIX timestamp specified by the user. You may double-check if the number is acceptable. And choose to reject any quotes with invalid numbers. However, if a Market Maker wishes to set a maximum allowed expiry, please include that in the orderbook endpoint. `quoteId` Unique ID for this order request `chainId` Chain ID of the network (e.g., 1 for Ethereum, 56 for BSC) `nativePool` The Native Rfq Pool address that execute the trade. `availableBorrowBalance` The amount of buyer token Market Makers can borrow from Native Inventory at the moment, in wei #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote#example) **Example** Copy { "nonce": 0, "signer": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", "buyerToken": "0x55d398326f99059ff775485246999027b3197955", "sellerToken": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d", "buyerTokenAmount": "10100000000000000000000", "sellerTokenAmount": "10000000000000000000000", "deadlineTimestamp": "1671086729", "quoteId": "62716-206e-41cb-8559-013f1ed1a65a", "chainId": 56, "nativePool": "0x9aF2F3c0cD35283e13f7087e2b34b1444b57A44C" } In this example, a user requests to sign an order of 10,000 USDC for 10,100 USDT on Binance Smart Chain (BSC) to be transacted on the market maker's Native pool (`0xaaE854bdd940cf402d79e8051DC7E3390e32A3ac`). The order must be signed by the signer (`0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266`) for successful on-chain execution. ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote#order-signing) Order signing Native uses EIP-712 signatures to ensure the order is endorsed only by the assigned signer. The inputs required to sign the order correspond to the data sent in the `POST sign-quote` request. The code snippet below generates bytes encoded in hexadecimal to be returned in response to the `POST /sign-quote` request. ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote#response) **Response** The response must be in the following format: Name Description `success` Indicates whether you can sign the firm quote (true/false) `signature` The signature from signing the EIP-712 order object `order` The order object that contains the order details `errorMessage` Include the reason for the error if `success` is false. #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote#example-1) **Example** In the response above, the market maker returns the generated signature and the corresponding order object to Native. With the signature, the customer can submit the transaction to execute the swap. circle-info **Note** * The signature must start with `0x` and have a total of 132 characters. circle-info The Native server is hosted in the AWS Tokyo region, and all market makers are required to respond to all endpoints in 100ms (end-to-end). [PreviousFirm-Quotechevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/firm-quote) [NextOn-chain events for swapchevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/on-chain-events-for-swap) Last updated 16 days ago * [Endpoint](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote#sign-quote-endpoint) * [Params](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote#params) * [Order signing](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote#order-signing) * [Response](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote#response) sun-brightdesktopmoon Copy async function signOrderNative(data) { const wallet = new ethers.Wallet(privateKey, provider); const order = { nonce: data.nonce, signer: data.signer, buyerToken: data.buyerToken, sellerToken: data.sellerToken, buyerTokenAmount: data.buyerTokenAmount, sellerTokenAmount: data.sellerTokenAmount, deadlineTimestamp: data.deadlineTimestamp, quoteId: data.quoteId }; const signature = await generateSignature(order, wallet, data.nativePool, data.chainId); return { success: true, signature: signature, order: order }; } async function generateSignature(data, wallet, nativePool, chainId) { const signatureData = { types: { Order: [\ { name: "nonce", type: "uint256" },\ { name: "signer", type: "address" },\ { name: "buyerToken", type: "address" },\ { name: "sellerToken", type: "address" },\ { name: "buyerTokenAmount", type: "uint256" },\ { name: "sellerTokenAmount", type: "uint256" },\ { name: "deadlineTimestamp", type: "uint256" },\ { name: "decayStartTime", type: "uint256" },\ { name: "decayExponent", type: "uint256" },\ { name: "maxSlippageBps", type: "uint256" },\ { name: "quoteId", type: "bytes16" }\ ], }, primaryType: 'Order', domain: { name: "Native RFQ Pool", version: "1", verifyingContract: nativePool, chainId }, message: { nonce: data.nonce, signer: data.signer, buyerToken: data.buyerToken, sellerToken: data.sellerToken, buyerTokenAmount: data.buyerTokenAmount, sellerTokenAmount: data.sellerTokenAmount, deadlineTimestamp: data.deadlineTimestamp, decayStartTime: 0, decayExponent: 0, maxSlippageBps: 0, quoteId: Buffer.from(data.quoteId.replace(/-/g, ""), "hex") }, }; const signature = await wallet._signTypedData(signatureData.domain, signatureData.types, signatureData.message); return signature; } Copy { "success": true, "signature": "0x4547e11611094f4295c4175a3266ebd98028edfb30d29a1dc0c42b8bf71401ef4e61c41a4f7aa5e536a6118273d22ed9efe5139005a750745994de6771e273181c", "order": { "nonce": 1, // Same as the nonce "signer": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", "buyerToken": "0x55d398326f99059ff775485246999027b3197955", "sellerToken": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d", "buyerTokenAmount": "10100000000000000000000", "sellerTokenAmount": "10000000000000000000000", "deadlineTimestamp": "1671086729", "quoteId": "62716-206e-41cb-8559-013f1ed1a65a" }, "errorMessage": "" } sun-brightdesktopmoon --- # POST Settlement status | Native Documentation ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-settlement-status#post-v1-lend-settlement-status) Checks the status of the time delay and get the signature calldata if the time delay has been passed. post https://newapi.native.org/lend/v1/lend/settlement-status Header parameters apiKeystringRequired The API key that was assigned to you by Native Body application/jsonchevron-down application/json chainstring · enumRequired Native blockchain name, eg: ethereum, bsc, etc Example: `ethereum`Possible values: `ethereum``bsc``bsc_testnet``sepolia``polygon``mumbai``arbitrum``avalanche``mantle``zetachain_athens3``base``manta``scroll``zetachain``linea``zklink``morph_testnet``morph_holesky_testnet``mantle_sepolia_testnet``polygon_amoy_testnet``avalanche_fuji_testnet``berachain_bartio_testnet` recipientstringRequired The address of the market maker or the settler Pattern: `^0x[a-fA-F0-9]{40}$` positionUpdatesobject\[\]Required The position updates for the settlement Show propertiesplus traderstringRequired The address of the trader Pattern: `^0x[a-fA-F0-9]{40}$` Responses chevron-right 201 Success application/json chevron-right 500 There was an exception with the server post /v1/lend/settlement-status HTTPchevron-down HTTPcURLJavaScriptPython Test it 201 Success chevron-down #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-settlement-status#during-time-delay) During time delay Copy { "status": "pending", "readyAt": "2024-01-31T07:12:26.976Z", "expiresAt": "2024-01-31T07:13:26.976Z" } #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-settlement-status#ready) **Ready** #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-settlement-status#expired) **Expired** #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-settlement-status#error) Error [PreviousPOST Cancel settlementchevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-cancel-settlement) [NextPOST Request collateral removalchevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-request-collateral-removal) Last updated 1 year ago sun-brightdesktopmoon Copy POST /lend/v1/lend/settlement-status HTTP/1.1 Host: newapi.native.org apiKey: text Content-Type: application/json Accept: */* Content-Length: 115 { "chain": "ethereum", "recipient": "text", "positionUpdates": [\ {\ "tokenAddress": "text",\ "amount": "text"\ }\ ], "trader": "text" } Copy { "status": "text", "readyAt": "2026-04-03T12:39:51.537Z", "expiresAt": "2026-04-03T12:39:51.537Z", "data": {} } Copy { "status": "ready", "readyAt": "2024-01-08T02:03:15.635Z", "expiresAt": "2024-01-08T02:04:15.636Z", "data": { "request": { "nonce": 2136417542436379, "deadline": 1704679455, "positionUpdates": [\ {\ "tokenAddress": "0x2A5Bf6854cA6c236D190b7cfE206457B8d46506C",\ "amount": "200000000000000000000"\ }\ ] }, "signature": "0x4ea3518372d87cebd8dc869062648b717aac4ba49766967afe4747023d619ce626eefe7be09ab5866b3977e1654af355c2bf80550386d82de4d123d0c70291a31b", "recipient": "0x9B85B4A413Efe69684290816a3E814B4aA1EFf63", "txRequest": { "to": "0xC71a906A4B0721E58fC36314474334FdB2bAB937", "value": "0", "calldata": "0x4339a57d000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001200000000000000000000000009b85b4a413efe69684290816a3e814b4aa1eff630000000000000000000000000000000000000000000000000007970f78b5761b00000000000000000000000000000000000000000000000000000000659b581f000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002a5bf6854ca6c236d190b7cfe206457b8d46506c00000000000000000000000000000000000000000000000ad78ebc5ac620000000000000000000000000000000000000000000000000000000000000000000414ea3518372d87cebd8dc869062648b717aac4ba49766967afe4747023d619ce626eefe7be09ab5866b3977e1654af355c2bf80550386d82de4d123d0c70291a31b00000000000000000000000000000000000000000000000000000000000000" } } } Copy { "status": "expired", "readyAt": "2024-01-31T07:12:26.976Z", "expiresAt": "2024-01-31T07:13:26.976Z" } Copy { "statusCode": 400, "message": "No request has been made", "error": "Bad Request" } sun-brightdesktopmoon --- # POST Cancel settlement | Native Documentation ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-cancel-settlement#post-v1-lend-cancel-settlement) Cancels the settlement request and unpause the market maker's trading activities. post https://newapi.native.org/lend/v1/lend/cancel-settlement Header parameters apiKeystringRequired The API key that was assigned to you by Native Body application/jsonchevron-down application/json chainstring · enumRequired Native blockchain name, eg: ethereum, bsc, etc Example: `ethereum`Possible values: `ethereum``bsc``bsc_testnet``sepolia``polygon``mumbai``arbitrum``avalanche``mantle``zetachain_athens3``base``manta``scroll``zetachain``linea``zklink``morph_testnet``morph_holesky_testnet``mantle_sepolia_testnet``polygon_amoy_testnet``avalanche_fuji_testnet``berachain_bartio_testnet` recipientstringRequired The address of the market maker or the settler Pattern: `^0x[a-fA-F0-9]{40}$` positionUpdatesobject\[\]Required The position updates for the settlement Show propertiesplus traderstringRequired The address of the trader Pattern: `^0x[a-fA-F0-9]{40}$` Responses chevron-right 201 Success application/json successstringRead-onlyRequired chevron-right 500 There was an exception with the server post /v1/lend/cancel-settlement HTTPchevron-down HTTPcURLJavaScriptPython Test it 201 Success chevron-down #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-cancel-settlement#example-response) Example response Copy { "status": "success", "id": "b9292014-1e85-43e8-a635-8a4f1c5423b9" } #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-cancel-settlement#error-responses) Error responses [PreviousPOST Request settlementchevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-request-settlement) [NextPOST Settlement statuschevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-settlement-status) Last updated 1 year ago sun-brightdesktopmoon Copy POST /lend/v1/lend/cancel-settlement HTTP/1.1 Host: newapi.native.org apiKey: text Content-Type: application/json Accept: */* Content-Length: 115 { "chain": "ethereum", "recipient": "text", "positionUpdates": [\ {\ "tokenAddress": "text",\ "amount": "text"\ }\ ], "trader": "text" } Copy { "success": "text" } Copy { "statusCode": 400, "message": "Settlement request not found", "error": "Bad Request" } sun-brightdesktopmoon --- # POST Cancel collateral removal | Native Documentation ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-cancel-collateral-removal#post-v1-lend-cancel-collateral-removal) Cancels the settlement request and unpause trading activities. post https://newapi.native.org/lend/v1/lend/cancel-collateral-removal Header parameters apiKeystringRequired The API key that was assigned to you by Native Body application/jsonchevron-down application/json recipientstringRequired The address of the market maker or the settler Pattern: `^0x[a-fA-F0-9]{40}$` chainstring · enumRequired Native blockchain name, eg: ethereum, bsc, etc Example: `ethereum`Possible values: `ethereum``bsc``bsc_testnet``sepolia``polygon``mumbai``arbitrum``avalanche``mantle``zetachain_athens3``base``manta``scroll``zetachain``linea``zklink``morph_testnet``morph_holesky_testnet``mantle_sepolia_testnet``polygon_amoy_testnet``avalanche_fuji_testnet``berachain_bartio_testnet` tokensobject\[\]Required The tokens to be removed as collateral Show propertiesplus traderstringRequired The address of the trader Pattern: `^0x[a-fA-F0-9]{40}$` Responses chevron-right 201 Success application/json statusstringRead-onlyRequired readyAtstring · date-timeRead-onlyRequired expiresAtstring · date-timeRead-onlyRequired dataobjectRead-onlyRequired chevron-right 500 There was an exception with the server post /v1/lend/cancel-collateral-removal HTTPchevron-down HTTPcURLJavaScriptPython Test it 201 Success chevron-down #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-cancel-collateral-removal#success-response) Success response Copy { "success": true } #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-cancel-collateral-removal#error-responses) Error responses [PreviousPOST Request collateral removalchevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-request-collateral-removal) [NextPOST Collateral removal statuschevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-collateral-removal-status) Last updated 1 year ago sun-brightdesktopmoon Copy POST /lend/v1/lend/cancel-collateral-removal HTTP/1.1 Host: newapi.native.org apiKey: text Content-Type: application/json Accept: */* Content-Length: 106 { "recipient": "text", "chain": "ethereum", "tokens": [\ {\ "tokenAddress": "text",\ "amount": "text"\ }\ ], "trader": "text" } Copy { "status": "text", "readyAt": "2026-04-03T13:17:51.879Z", "expiresAt": "2026-04-03T13:17:51.879Z", "data": {} } Copy { "statusCode": 400, "message": "Collateral removal request not found", "error": "Bad Request" } sun-brightdesktopmoon --- # GET Refund | Native Documentation ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-refund#get-swap-api-v2-v1-bridge-refund) /bridge/refund get https://v2.api.native.org/swap-api-v2/v1/bridge/refund Request refund for a bridging request Query parameters from\_addressstringRequired Address of the user requesting the refund Pattern: `^0x[a-fA-F0-9]{40}$` bridge\_quote\_idstringRequired Unique identifier for the bridging request. This should match the quoteId in the response of /bridge/firm-quote. Pattern: `^0x[a-fA-F0-9]{40}$` Header parameters api\_keystringRequired The API key that was assigned to you by Native Responses chevron-right 200 Successful response containing refund details application/json get /swap-api-v2/v1/bridge/refund HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Successful response containing refund details [PreviousGET Firm quotechevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-firm-quote) [NextGET Transaction historychevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-transaction-history) Last updated 3 months ago sun-brightdesktopmoon Copy GET /swap-api-v2/v1/bridge/refund?from_address=text&bridge_quote_id=text HTTP/1.1 Host: v2.api.native.org api_key: text Accept: */* Copy {} sun-brightdesktopmoon --- # POST Request collateral removal | Native Documentation ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-request-collateral-removal#post-v1-lend-request-collateral-removal) Creates a collateral removal request and start the time delay. Note that Market Maker will be paused at this point from other activities. post https://newapi.native.org/lend/v1/lend/request-collateral-removal Header parameters apiKeystringRequired The API key that was assigned to you by Native Body application/jsonchevron-down application/json recipientstringRequired The address of the market maker or the settler Pattern: `^0x[a-fA-F0-9]{40}$` chainstring · enumRequired Native blockchain name, eg: ethereum, bsc, etc Example: `ethereum`Possible values: `ethereum``bsc``bsc_testnet``sepolia``polygon``mumbai``arbitrum``avalanche``mantle``zetachain_athens3``base``manta``scroll``zetachain``linea``zklink``morph_testnet``morph_holesky_testnet``mantle_sepolia_testnet``polygon_amoy_testnet``avalanche_fuji_testnet``berachain_bartio_testnet` tokensobject\[\]Required The tokens to be removed as collateral Show propertiesplus traderstringRequired The address of the trader Pattern: `^0x[a-fA-F0-9]{40}$` Responses chevron-right 201 Success application/json statusstringRead-onlyRequired readyAtstring · date-timeRead-onlyRequired expiresAtstring · date-timeRead-onlyRequired dataobjectRead-onlyRequired chevron-right 500 There was an exception with the server post /v1/lend/request-collateral-removal HTTPchevron-down HTTPcURLJavaScriptPython Test it 201 Success chevron-down #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-request-collateral-removal#success-response) Success response Copy { "success": true, "id": "ffa84899-3c76-4e2b-a720-10c5d9bc0da0" } #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-request-collateral-removal#error-responses) Error responses [PreviousPOST Settlement statuschevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-settlement-status) [NextPOST Cancel collateral removalchevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-cancel-collateral-removal) Last updated 1 year ago sun-brightdesktopmoon Copy POST /lend/v1/lend/request-collateral-removal HTTP/1.1 Host: newapi.native.org apiKey: text Content-Type: application/json Accept: */* Content-Length: 106 { "recipient": "text", "chain": "ethereum", "tokens": [\ {\ "tokenAddress": "text",\ "amount": "text"\ }\ ], "trader": "text" } Copy { "status": "text", "readyAt": "2026-04-03T13:17:52.141Z", "expiresAt": "2026-04-03T13:17:52.141Z", "data": {} } Copy // Pending request { "statusCode": 400, "message": "Pending request exists, please cancel previous request!", "error": "Bad Request" } sun-brightdesktopmoon --- # GET Firm quote | Native Documentation ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-firm-quote#get-swap-api-v2-v1-bridge-firm-quote) /bridge/firm-quote get https://v2.api.native.org/swap-api-v2/v1/bridge/firm-quote Request executable calldata for initiating a bridging request Query parameters from\_addressstringRequired Effectively recipient. This is the pay out address of the final swapped tokens. Funding address will always be the address calls Native Bridge Contract. Pattern: `^0x[a-fA-F0-9]{40}$` src\_chainstring · enumRequired Blockchain name of the chain to initiate bridging, eg: ethereum, arbitrum, ... (refer to network name reference) Possible values: `ethereum``bsc``arbitrum``base` dst\_chainstring · enumRequired Blockchain name of the chain to receive bridged tokens, eg: ethereum, arbitrum, ... (refer to network name reference) Possible values: `ethereum``bsc``arbitrum``base` token\_instringRequired Address of the token to be sold/bridge-out Pattern: `^0x[a-fA-F0-9]{40}$` token\_outstringRequired Address of the token to be bought/bridge-in Pattern: `^0x[a-fA-F0-9]{40}$` amountstringRequired The amount of `token_in` token to pay/sell/bridge-out versionstringOptional The version of Native Swap Router (if bridging includes token swaps). Leave empty or use 4 (latest) refund\_tostringRequired The address to receive refunded tokens in an event of fail and refund. This MUST be the real user address or any address that can process the refund. Otherwise the fund will stuck. Pattern: `^0x[a-fA-F0-9]{40}$` Header parameters api\_keystringRequired The API key that was assigned to you by Native Responses chevron-right 200 Successful response containing executable calldata for initiating a bridging request application/json successbooleanOptional Indicates whether the request was successful ordersobject\[\]Optional Array of order objects containing swap details Show propertiesplus widgetFeeobjectOptional Overall widget fee configuration Show propertiesplus widgetFeeSignaturestringOptional Overall widget fee signature recipientstringOptional Address that will receive the final tokens Pattern: `^0x[a-fA-F0-9]{40}$` amountInstringOptional Total input amount (in wei) amountOutstringOptional Total output amount after fees (in wei) amountOutBeforeFeestringOptional Output amount before fees are deducted (in wei) fallbackSwapDataArrayobject\[\]Optional Fallback swap data array for alternative swap paths tokenTransferFeeOnPercentnumber · doubleOptional Token transfer fee as a percentage txRequestobjectOptional Transaction request data to execute the bridge Show propertiesplus sourceinteger · int32\[\]Optional Source identifiers for the quote quoteSourceinteger · int32\[\]Optional Quote source identifiers errorMessagestringOptional Error message if any issues occurred router\_versionstringOptional Version of the router used toWrapbooleanOptional Whether the operation involves wrapping tokens toUnwrapbooleanOptional Whether the operation involves unwrapping tokens amountInOffsetinteger · int32Optional Offset for amountIn in calldata amountOutMinimumOffsetinteger · int32Optional Offset for amountOutMinimum in calldata prioritystring · enumOptional Transaction priority level (e.g., 'fast') Possible values: `fast``standard``slow` get /swap-api-v2/v1/bridge/firm-quote HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Successful response containing executable calldata for initiating a bridging request [PreviousGET Indicative quotechevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-indicative-quote) [NextGET Refundchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-refund) Last updated 3 months ago sun-brightdesktopmoon Copy GET /swap-api-v2/v1/bridge/firm-quote?from_address=text&src_chain=ethereum&dst_chain=ethereum&token_in=text&token_out=text&amount=text&refund_to=text HTTP/1.1 Host: v2.api.native.org api_key: text Accept: */* Copy { "success": true, "orders": [\ {\ "pool": "text",\ "signer": "text",\ "recipient": "text",\ "sellerToken": "text",\ "buyerToken": "text",\ "effectiveSellerTokenAmount": "text",\ "sellerTokenAmount": "text",\ "buyerTokenAmount": "text",\ "deadlineTimestamp": 1,\ "nonce": 1,\ "quoteId": "text",\ "multiHop": true,\ "signature": "text",\ "externalSwapCalldata": "text",\ "amountOutMinimum": "text",\ "widgetFee": {\ "signer": "text",\ "feeRecipient": "text",\ "feeRate": 1\ },\ "widgetFeeSignature": "text",\ "confidenceExtractedValueT": 1,\ "confidenceExtractedValueE": 1,\ "confidenceExtractedValueM": 1,\ "confidenceExtractedValueN": 1\ }\ ], "widgetFee": { "signer": "text", "feeRecipient": "text", "feeRate": 1 }, "widgetFeeSignature": "text", "recipient": "text", "amountIn": "text", "amountOut": "text", "amountOutBeforeFee": "text", "fallbackSwapDataArray": [\ {}\ ], "tokenTransferFeeOnPercent": 1, "txRequest": { "target": "text", "calldata": "text", "value": "text", "function": "text" }, "source": [\ 1\ ], "quoteSource": [\ 1\ ], "errorMessage": "text", "router_version": "text", "toWrap": true, "toUnwrap": true, "amountInOffset": 1, "amountOutMinimumOffset": 1, "priority": "fast" } sun-brightdesktopmoon --- # POST Request settlement | Native Documentation ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-request-settlement#post-v1-lend-request-settlement) Creates a settlement request and starts the time delay. Note that Market Maker will be paused from other activities at this point. post https://newapi.native.org/lend/v1/lend/request-settlement Header parameters apiKeystringRequired The API key that was assigned to you by Native Body application/jsonchevron-down application/json chainstring · enumRequired Native blockchain name, eg: ethereum, bsc, etc Example: `ethereum`Possible values: `ethereum``bsc``bsc_testnet``sepolia``polygon``mumbai``arbitrum``avalanche``mantle``zetachain_athens3``base``manta``scroll``zetachain``linea``zklink``morph_testnet``morph_holesky_testnet``mantle_sepolia_testnet``polygon_amoy_testnet``avalanche_fuji_testnet``berachain_bartio_testnet` recipientstringRequired The address of the market maker or the settler Pattern: `^0x[a-fA-F0-9]{40}$` positionUpdatesobject\[\]Required The position updates for the settlement Show propertiesplus traderstringRequired The address of the trader Pattern: `^0x[a-fA-F0-9]{40}$` Responses chevron-right 201 Success application/json chevron-right 500 There was an exception with the server post /v1/lend/request-settlement HTTPchevron-down HTTPcURLJavaScriptPython Test it 201 Success chevron-down #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-request-settlement#example-response) Example response Copy { "id": "d49c39ed-ff63-41c0-bf3a-75f6d56f7346", "nonce": "6168514449590345", "recipient": "0x9B85B4A413Efe69684290816a3E814B4aA1EFf63", "chain": "base", "positionUpdates": [\ {\ "tokenAddress": "0x4200000000000000000000000000000000000006",\ "amount": "-5000000000"\ }\ ], "creditChangeUsd": -0.00001168615, "trader": "0x9B85B4A413Efe69684290816a3E814B4aA1EFf63", "requestAt": "2024-01-31T08:09:22.645Z", "enableAt": "2024-01-31T08:14:22.645Z", "expiresAt": "2024-01-31T08:15:22.645Z", "type": "settlement" } #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-request-settlement#error-responses) Error responses [PreviousGET Market maker infochevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/get-market-maker-info) [NextPOST Cancel settlementchevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-cancel-settlement) Last updated 1 year ago sun-brightdesktopmoon Copy POST /lend/v1/lend/request-settlement HTTP/1.1 Host: newapi.native.org apiKey: text Content-Type: application/json Accept: */* Content-Length: 115 { "chain": "ethereum", "recipient": "text", "positionUpdates": [\ {\ "tokenAddress": "text",\ "amount": "text"\ }\ ], "trader": "text" } Copy { "chain": "ethereum", "recipient": "text", "positionUpdates": [\ {\ "tokenAddress": "text",\ "amount": "text"\ }\ ], "trader": "text" } Copy // Try to withdraw more than long position amount { "statusCode": 400, "message": "Cannot make long position to become short position", "error": "Bad Request" } // Try to deposit into long position { "statusCode": 400, "message": "Cannot increasing existing long position", "error": "Bad Request" } // Try to deposit more than short position amount { "statusCode": 400, "message": "Cannot make short position to become long position", "error": "Bad Request" } // Try to withdraw from short position { "statusCode": 400, "message": "Cannot decreasing existing short position", "error": "Bad Request" } // Invalid token address { "statusCode": 400, "message": "Cannot settle unexist position", "error": "Bad Request" } // Invalid mm { "statusCode": 404, "message": "MM Settings not found", "error": "Not Found" } sun-brightdesktopmoon --- # GET Market maker info | Native Documentation A single interface to return all helpful info for a given market maker. Including: * Basic info, like address, whitelisted IPs, status flags. * Credit info. * Collateral info. * Position info, both long and short. * Token info. Copy { "mmAddress": "0x2AC1977DffA4917bf42419aDf70F6ba79cEBd326", // mm trader address "whitelist_ips": [ // whitelisted list of ips for interacting with Native API\ "..."\ ], "is_forced_paused": true, // if the mm is paused manually by Native "is_paused": true, // if the mm is paused due to settlement or collateral removal "is_short_fee_paused": true, // if short fee is paused "totalCreditUsd": "10000", // total credit generated by deposited collaterals "additionalCreditUsd": "0", // additional credit besides collateral "overallCreditUsd": "-70", // credit status generated by credit items "remainingCreditUsd": "9930", // remaining credit "collaterals": { // all the collaterals that contributes to the credit "0xdac17f958d2ee523a2206206994597c13d831ec7": { "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7", "tokenSymbol": "USDT", "chainId": 1, "tokenUsdPrice": "1", "longCreditFactor": "0.8", // similar to "collateral factor", applies to usd value for final credit number "amount": "12500000000", "amountEther": "12500", "amountUsd": "12500", "creditUsd": "10000", "pendingRequest": {} // shows any pending request related to this collateral } }, "positions": { // all the positions that contributes and uses credits "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": { "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "tokenSymbol": "USDC", "chainId": 1, "tokenUsdPrice": "1", "longCreditFactor": "0.9", "amount": "-100000000", "amountEther": "-100", "amountUsd": "-100", "pendingFee": "0", // any funding fee that is not yet realised into position and not updated on chain "pendingFeeEther": "0", "pendingFeeUsd": "0", "creditUsd": "-100", "pendingRequest": {} }, "0xdac17f958d2ee523a2206206994597c13d831ec7": { "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7", "tokenSymbol": "USDT", "chainId": 1, "tokenUsdPrice": "1", "longCreditFactor": "0.8", "amount": "37500000", "amountEther": "37.5", "amountUsd": "37.5", "pendingFee": "0", "pendingFeeEther": "0", "pendingFeeUsd": "0", "creditUsd": "30", "pendingRequest": {} }, // ... }, "next_epoch_update_timestamp": "1754060848", // the timestamp of next epoch update that realise the pending fee into position "tokens": { // all the available token info, including available borrow, and fee related "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": { "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "tokenSymbol": "USDC", "chainId": 1, "tokenUsdPrice": "1", "max_borrow_amount": "9930000000", "max_borrow_amount_ether": "9930", "longCreditFactor": "0.9", "short_fee_bps": "10" // annualised fee rate for short positions }, "0xdac17f958d2ee523a2206206994597c13d831ec7": { "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7", "tokenSymbol": "USDT", "chainId": 1, "tokenUsdPrice": "1", "max_borrow_amount": "9930000000", "max_borrow_amount_ether": "9930", "longCreditFactor": "0.8", "short_fee_bps": "10" }, // ... } } [PreviousNative Market Makers APIchevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api) [NextPOST Request settlementchevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-request-settlement) Last updated 8 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # For General Assets | Native Documentation **Metric** **AMMs** **Native V2** **Available Liquidity** <100% 100% **Fragmentation** Exists (Multiple Pools) None (Unified Pool) **Dynamic Allocation** Limited (Price Ranges Only) Full-Range Across All Pairs **Risk of Impermanent Loss** High (Active in Price Bands) None (Single-Sided Liquidity) **Capital Utilization** Low Maximum **Management Complexity** High (Active Monitoring) Low (Passive LP Participation) **Price Slippage** Moderate to High (Varies by Pool Depth) Minimal (Market-Responsive Pricing) **Incentive Flexibility** Low (Entire Pair Needs Incentives) High (Enable Single-side LPs Only) circle-info Fill out this [formarrow-up-right](https://forms.gle/12LaH1JQyhZqBHqw9) , and the Native team will be in touch. [PreviousFor Pegged Assetschevron-left](https://docs.native.org/native-dev/build-with-native/asset-issuers/for-pegged-assets) [NextMarket Makerschevron-right](https://docs.native.org/native-dev/build-with-native/market-makers) Last updated 2 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # On-chain events for swap | Native Documentation * Market makers should monitor the pool address for the following event to detect successful trades on-chain. * Match the event by the `quoteId` Copy event RfqTrade( address recipient, address sellerToken, address buyerToken, uint256 sellerTokenAmount, uint256 buyerTokenAmount, bytes16 quoteId, address signer ); [PreviousSign-Quotechevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote) [NextNative Market Makers APIchevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api) Last updated 8 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # MM Pricing and Signing API | Native Documentation [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api#id-1.-authentication) 1\. Authentication ----------------------------------------------------------------------------------------------------------------------------------------------------- Native requires the `api_key` header to be included in every request to authenticate that the request is coming from trusted users. We also offer flexible authentication methods to meet your needs. [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api#id-2.-integration-methods) 2\. Integration methods --------------------------------------------------------------------------------------------------------------------------------------------------------------- We offer market makers to integrate using **REST API** [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api#id-3.-native-credit-pools) 3\. **Native Credit Pools** ------------------------------------------------------------------------------------------------------------------------------------------------------------------- Market makers can utilize the liquidity in Native Credit Pools to facilitate swaps without needing to deploy capital directly on each chain. By providing collateral, market makers receive credit that can be used for trading and quoting. This setup allows quoting sizes to exceed the actual collateral provided. Native relies on seamless API integration with market makers to ensure accurate off-chain pricing. HTTPS protocol and authentication are required for all endpoints. Responses should be in JSON format, accompanied by appropriate status codes. [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api#get-started) Get Started ------------------------------------------------------------------------------------------------------------------------------------- To fully integrate with Native and leverage its capabilities, you need to implement the following API endpoints: 1. [**Orderbook**](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/orderbook) **:** This endpoint allows Native to estimate prices for different order sizes. 2. [**Firm-Quote**](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/firm-quote) **:** This endpoint enables Native to obtain a precise price from you for a given token and amount. 3. [**Sign-Quote**](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/sign-quote) **:** This endpoint allows you to validate and sign the order for on-chain execution. [PreviousMarket Makerschevron-left](https://docs.native.org/native-dev/build-with-native/market-makers) [NextOrderbookchevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/orderbook) Last updated 8 months ago * [1\. Authentication](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api#id-1.-authentication) * [2\. Integration methods](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api#id-2.-integration-methods) * [3\. Native Credit Pools](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api#id-3.-native-credit-pools) * [Get Started](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api#get-started) sun-brightdesktopmoon sun-brightdesktopmoon --- # Miscellaneous | Native Documentation A list of features and guides to better integrate and compose with Swap APIs. [Error Handlingchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/error-handling) [PreviousGET Firm quotechevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/get-firm-quote) [NextError Handlingchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/error-handling) Last updated 2 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Native Market Makers API | Native Documentation Native also provides a set of useful API for market makers to view status, manage collateral, settle positions. [GET Market maker infochevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/get-market-maker-info) [PreviousOn-chain events for swapchevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/mm-pricing-and-signing-api/on-chain-events-for-swap) [NextGET Market maker infochevron-right](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/get-market-maker-info) Last updated 8 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Minimum Bridge To Amount | Native Documentation To avoid excessive gas spent eating into the buying (bridge to) token amount. There is a minimum bridge to amount for any bridge order. Usually it is higher on Ethereum mainnet, and negligible on other networks. Native will periodically review and adjust these values, the latest results will be updated here. #### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/minimum-bridge-to-amount#ethereum) Ethereum Token Minimum Bridge To Amount (in WEI) ETH (WETH) 10000000000000000 USDT 20000000 USDC 20000000 WBTC 10000 #### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/minimum-bridge-to-amount#bnb-chain) BNB Chain Token Minimum Bridge To Amount (in WEI) BNB (WBNB) 15000000000000000 USDT 10000000000000000000 USDC 10000000000000000000 USD1 10000000000000000000 #### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/minimum-bridge-to-amount#arbitrum) Arbitrum Token Minimum Bridge To Amount (in WEI) ETH (WETH) 5000000000000000 USDT 10000000 USDC 10000000 #### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/minimum-bridge-to-amount#base) Base Token Minimum Bridge To Amount (in WEI) ETH (WETH) 5000000000000000 USDT 10000000 USDC 10000000 [PreviousError Handlingchevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/error-handling) [NextAsset Issuerschevron-right](https://docs.native.org/native-dev/build-with-native/asset-issuers) Last updated 3 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # AMM Fallback | Native Documentation circle-info Only supported in version 4 and above Native's own liquidity provides remarkable depth and competitiveness for major assets like WETH and WBTC. However, to use the Swap API in wallets or swap widgets, Native offers an AMM fallback option to support trading of nearly any tokens. To enable this feature for your API key, contact Native team members through an existing channel. ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/amm-fallback#quote-and-swap) Quote and Swap To use this feature: * Make sure your API key is whitelisted for AMM fallback. * Use `version=4` when calling `/firm-quote`. `/indicative-quote` and `/firm-quote` will automatically utilise AMM liquidity if the quoted pair is not available from Native's own liquidity. No adjustment is needed. All returned fields will work as expected. circle-exclamation Please note that in liquidity fallback. The contract function that gets called is different. Normally, it should be `tradeRFQT`, but in AMM fallback, it will be `externalSwap`. To track which function the swap tx is calling. Check `txRequest.function`. ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/amm-fallback#get-tradable-token) Get Tradable Token AMM fallback enables trading for thousands of tokens, therefore it is impractical to show individual trading pairs in `/orderbook` endpoint. Instead, we offer a new endpoint to keep track of all the supported tokens. Call `/widget-tokens?chains={chainName}` with your API key. Example: Copy ## Get All Supported Tokens on Ethereum Including AMM Fallback curl "https://v2.api.native.org/swap-api-v2/v1/widget-tokens?chains=ethereum" \ -H "apiKey: $YOUR_KEY_HERE" [PreviousMultihopchevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/multihop) [NextBlacklistingchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/blacklisting) Last updated 5 months ago * [Quote and Swap](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/amm-fallback#quote-and-swap) * [Get Tradable Token](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/amm-fallback#get-tradable-token) sun-brightdesktopmoon Copy { "ethereum": [\ {\ "name": "World Liberty Financial",\ "desc": "",\ "logo": "https://s2.coinmarketcap.com/static/img/coins/64x64/33251.png",\ "chain": "ethereum",\ "symbol": "WLFI",\ "address": "0xdA5e1988097297dCdc1f90D4dFE7909e847CBeF6",\ "decimals": 18,\ "isFeatured": false,\ "isStablecoin": true,\ "isSupported": true\ },\ {\ "name": "Skate",\ "desc": "",\ "logo": "https://static.native.org/logo/tokens/1_0x61DBbBb552dc893ab3aAd09F289f811E67cEf285.jpg",\ "chain": "ethereum",\ "symbol": "SKATE",\ "address": "0x61DBbBb552dc893ab3aAd09F289f811E67cEf285",\ "decimals": 18,\ "isFeatured": false,\ "isStablecoin": true,\ "isSupported": true\ },\ // ...\ ] } sun-brightdesktopmoon --- # Multihop | Native Documentation Swap API and Router support multihop between all trading pairs in `/orderbook` return, making swapping with Native liquidity more versatile. To enable, add `allow_multihop=true` when requesting `/indicative-quote` or `/firm-quote`. circle-info Please note that `/orderbook` only return base trading pairs and does not return any virtual pairs enabled by multihop. To calculate price and depth, please combine two orderbooks locally. ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/multihop#example) Example Example orderbooks: Copy [\ // WBTC->USDT\ {\ "base_symbol": "WBTC",\ "quote_symbol": "USDT",\ "base_address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",\ "quote_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",\ "minimum_in_base": 0,\ "side": "bid",\ "levels": [\ [\ 0.5,\ 122739.77003987515\ ],\ [\ 1,\ 122728.46555507004\ ],\ [\ 1,\ 122713.39290866326\ ],\ [\ 0.6261126319999994,\ 122701.13799830334\ ]\ ]\ },\ // USDT->USDC\ {\ "base_symbol": "USDT",\ "quote_symbol": "USDC",\ "base_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",\ "quote_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",\ "minimum_in_base": 0,\ "side": "bid",\ "levels": [\ [\ 295958.17538750934,\ 1.0003537268714557\ ]\ ]\ },\ //...\ \ Tx: [https://www.tdly.co/shared/simulation/52280a28-72a7-41fb-a741-896101281cacarrow-up-right](https://www.tdly.co/shared/simulation/52280a28-72a7-41fb-a741-896101281cac)\ \ circle-exclamation\ \ Please note that in multihop. The contract function that gets called is different. Normally, it should be `tradeRFQT`, but in multihop, it will be `multicall`.\ \ To track which function the swap tx is calling. Use version 4 or above and check `txRequest.function`.\ \ circle-info\ \ Multihop currently support only major tokens being the intermediate. Limited to:\ \ USDT, USDC, WBNB, WETH, WBTC\ \ [PreviousNative Tokens Supportchevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/native-tokens-support)\ [NextAMM Fallbackchevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/firmquote-swap-apis/miscellaneous/amm-fallback)\ \ Last updated 5 months ago\ \ sun-brightdesktopmoon\ \ Copy\ \ ## Get Indicative Quote for WBTC->USDC\ curl "https://v2.api.native.org/swap-api-v2/v1/indicative-quote?from_address=0xbf381E1cBfdb0D02F3800010e490130D3dC73118&src_chain=ethereum&dst_chain=ethereum&token_in=0x2260fac5e5542a773aa44fbcfedf7c193bc2c599&token_out=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&slippage=0.5&amount=0.00001&allow_multihop=true" \\ -H "apiKey: $YOUR_KEY_HERE"\ \ Copy\ \ ## Get Firm Quote for WBTC->USDC\ curl "https://v2.api.native.org/swap-api-v2/v1/firm-quote?from_address=0xbf381E1cBfdb0D02F3800010e490130D3dC73118&amount=0.001&token_in=0x2260fac5e5542a773aa44fbcfedf7c193bc2c599&token_out=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&version=3&src_chain=ethereum&dst_chain=ethereum&allow_multihop=true" \\ -H "apiKey: $YOUR_KEY_HERE"\ \ sun-brightdesktopmoon --- # POST Collateral removal status | Native Documentation ### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-collateral-removal-status#post-v1-lend-collateral-removal-status) Checks the status of the time delay and get the signature calldata if the time delay has been passed. post https://newapi.native.org/lend/v1/lend/collateral-removal-status Header parameters apiKeystringRequired The API key that was assigned to you by Native Body application/jsonchevron-down application/json recipientstringRequired The address of the market maker or the settler Pattern: `^0x[a-fA-F0-9]{40}$` chainstring · enumRequired Native blockchain name, eg: ethereum, bsc, etc Example: `ethereum`Possible values: `ethereum``bsc``bsc_testnet``sepolia``polygon``mumbai``arbitrum``avalanche``mantle``zetachain_athens3``base``manta``scroll``zetachain``linea``zklink``morph_testnet``morph_holesky_testnet``mantle_sepolia_testnet``polygon_amoy_testnet``avalanche_fuji_testnet``berachain_bartio_testnet` tokensobject\[\]Required The tokens to be removed as collateral Show propertiesplus traderstringRequired The address of the trader Pattern: `^0x[a-fA-F0-9]{40}$` Responses chevron-right 201 Success application/json statusstringRead-onlyRequired readyAtstring · date-timeRead-onlyRequired expiresAtstring · date-timeRead-onlyRequired dataobjectRead-onlyRequired chevron-right 500 There was an exception with the server post /v1/lend/collateral-removal-status HTTPchevron-down HTTPcURLJavaScriptPython Test it 201 Success chevron-down #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-collateral-removal-status#during-time-delay) During time delay Copy { "status": "pending", "readyAt": "2024-01-31T09:39:15.776Z", "expiresAt": "2024-01-31T09:40:15.776Z" } #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-collateral-removal-status#ready) Ready #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-collateral-removal-status#expired) Expired #### [hashtag](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-collateral-removal-status#errors) Errors [PreviousPOST Cancel collateral removalchevron-left](https://docs.native.org/native-dev/build-with-native/market-makers/native-market-makers-api/post-cancel-collateral-removal) [NextAddresseschevron-right](https://docs.native.org/native-dev/resources/addresses) Last updated 1 year ago sun-brightdesktopmoon Copy POST /lend/v1/lend/collateral-removal-status HTTP/1.1 Host: newapi.native.org apiKey: text Content-Type: application/json Accept: */* Content-Length: 106 { "recipient": "text", "chain": "ethereum", "tokens": [\ {\ "tokenAddress": "text",\ "amount": "text"\ }\ ], "trader": "text" } Copy { "status": "text", "readyAt": "2026-04-03T13:17:52.777Z", "expiresAt": "2026-04-03T13:17:52.777Z", "data": {} } Copy { "status": "ready", "readyAt": "2024-01-08T02:03:15.635Z", "expiresAt": "2024-01-08T02:04:15.636Z", "data": { "request": { "nonce": 2136417542436379, "deadline": 1704679455, "positionUpdates": [\ {\ "tokenAddress": "0x2A5Bf6854cA6c236D190b7cfE206457B8d46506C",\ "amount": "200000000000000000000"\ }\ ] }, "signature": "0x4ea3518372d87cebd8dc869062648b717aac4ba49766967afe4747023d619ce626eefe7be09ab5866b3977e1654af355c2bf80550386d82de4d123d0c70291a31b", "recipient": "0x9B85B4A413Efe69684290816a3E814B4aA1EFf63", "txRequest": { "to": "0xC71a906A4B0721E58fC36314474334FdB2bAB937", "value": "0", "calldata": "0x4339a57d000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001200000000000000000000000009b85b4a413efe69684290816a3e814b4aa1eff630000000000000000000000000000000000000000000000000007970f78b5761b00000000000000000000000000000000000000000000000000000000659b581f000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002a5bf6854ca6c236d190b7cfe206457b8d46506c00000000000000000000000000000000000000000000000ad78ebc5ac620000000000000000000000000000000000000000000000000000000000000000000414ea3518372d87cebd8dc869062648b717aac4ba49766967afe4747023d619ce626eefe7be09ab5866b3977e1654af355c2bf80550386d82de4d123d0c70291a31b00000000000000000000000000000000000000000000000000000000000000" } } } Copy { "status": "expired", "readyAt": "2024-01-31T09:39:15.776Z", "expiresAt": "2024-01-31T09:40:15.776Z" } Copy { "statusCode": 400, "message": "No request has been made", "error": "Bad Request" } sun-brightdesktopmoon --- # GET Transaction history | Native Documentation ### [hashtag](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-transaction-history#get-swap-api-v2-v1-bridge-tx-history) /bridge/tx-history get https://v2.api.native.org/swap-api-v2/v1/bridge/tx-history Retrieve transaction history for a user Query parameters from\_addressstringRequired Address of the user requesting the transaction history Pattern: `^0x[a-fA-F0-9]{40}$` src\_chain\_idstringRequired Chain ID of the source/bridge-out chain. Note this is different from the src\_chain parameter in /bridge/firm-quote which is the network name. offsetstringOptional Pagination offset. Default is 0. page\_sizestringOptional Number of transactions to return per page. Header parameters api\_keystringRequired The API key that was assigned to you by Native Responses chevron-right 200 Successful response containing transaction history application/json tx\_historyobject\[\]Optional Array of transaction history entries Show propertiesplus has\_morebooleanOptional Indicates whether there are more transactions available next\_offsetinteger · int32Optional Offset to use for the next page of results get /swap-api-v2/v1/bridge/tx-history HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Successful response containing transaction history [PreviousGET Refundchevron-left](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-refund) [NextGET Transaction statuschevron-right](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/get-transaction-status) Last updated 3 months ago sun-brightdesktopmoon Copy GET /swap-api-v2/v1/bridge/tx-history?from_address=text&src_chain_id=text HTTP/1.1 Host: v2.api.native.org api_key: text Accept: */* Copy { "tx_history": [\ {\ "bridge_quote_id": "text",\ "create_time": "text"\ }\ ], "has_more": true, "next_offset": 1 } sun-brightdesktopmoon ---