Satoshi Lending Protocol Workflow
This document outlines the high-level workflows and terminology for the Satoshi Lending protocol.
Terminology
| Term | Definition |
|---|---|
| Collateral | Any non-USDC asset deposited to secure a loan. |
| Lenders | Users who supply assets to the pool to earn interest. |
| Borrowers | Users who provide collateral to take loans from the pool. |
| LTV (Loan to Value) | A metric used to assess the health of a borrower’s position. Formula: total_borrow_value.div(total_collateral_value) |
| Insurance Allocation Rate | (Also known as Reserve Factor) The percentage of the liquidation penalty diverted to the protocol’s Insurance Fund. |
| Liquidation Penalty | The amount deducted and sent to the liquidation account when a liquidation occurs. |
System Assumptions & Constraints
- Asset Types:
- Lending and borrowing are restricted to USDC.
- Collateral deposits are restricted to non-USDC assets.
- Contracts:
- There is a single USDC contract for deposits.
- There are currently three non-USDC contracts for collateral deposits.
- The Near intents contract is used exclusively for liquidation.
- Account Roles: A single account cannot function as both a lender and a borrower simultaneously.
Workflows
Lender Actions
Lending (Supply)
Involves the deposit of USDC into the protocol by a lender.
Unlending (Withdraw)
The withdrawal of principal USDC along with any accrued interest by the lender.
Borrower Actions
Collateral Deposit
A borrower deposits non-USDC assets to enable borrowing of USDC.
Repay
The repayment of borrowed USDC along with accrued interest by the borrower.
Withdraw Collateral
The withdrawal of deposited collateral by the borrower.
Borrow
The act of borrowing USDC from the protocol, secured by the deposited collateral.
Parameters of the protocol
This document outlines the key configurable parameters of the LendingProtocol. These values are critical for managing risk and defining the economic model of the protocol.
Interest Rate Model Parameters
These parameters define the interest rate model for USDC borrowing. The borrow rate is calculated based on the utilization of available liquidity.
usdc_base_borrow_rate
- Description: The base borrow rate for USDC, representing the minimum annual percentage rate (APR) when there are zero borrows (0% utilization).
usdc_rate_multiplier
- Description: A multiplier that determines how steeply the borrow rate increases as the utilization ratio increases. The formula is:
borrow_rate = usdc_base_borrow_rate + (utilization_ratio * usdc_rate_multiplier).
Liquidation Parameters
These parameters govern the process of liquidation for undercollateralized loans.
liquidation_penalty
- Description: The percentage fee applied to the value of collateral seized during a liquidation event. This penalty covers potential losses.
insurance_allocation_rate
- Description: The portion of the
liquidation_penaltythat is allocated to the protocol’s insurance fund. The remaining portion of the penalty is paid to the liquidator as a fee.
Loan-to-Value (LTV) Ratio Parameters
LTV ratios are fundamental risk parameters that determine how much can be borrowed against collateral and when a position is considered risky.
Formula: total_borrow_value.div(total_collateral_value)
borrow_threshold
- Description: The maximum Loan-to-Value (LTV) ratio for initiating a new borrow. For example, a value of 0.75 means a user can borrow up to 75% of their collateral’s value.
withdraw_threshold
- Description: The maximum Loan-to-Value (LTV) ratio permitted after a collateral withdrawal. This prevents users from withdrawing collateral if it would leave their position undercollateralized. It is often set to the same value as `borrow_threshold
liquidation_threshold
- Description: The Loan-to-Value (LTV) ratio at which a user’s position becomes eligible for liquidation. This value must be higher than the
borrow_thresholdto provide a safety buffer for borrowers.
Oracle Parameters
oracle_price_staleness_secs
- Description: The maximum age (in seconds) of an asset price from an oracle before it is considered stale and no longer valid for protocol operations. This is a critical safety feature to prevent acting on outdated price information.
Off-Chain Liquidation Process
Introduction
This document outlines the off-chain liquidation process for the protocol. It details the interaction between a liquidation bot and the smart contracts to manage under-collateralized loans, ensuring the solvency of the protocol by efficiently liquidating risky positions.
Core Principles and Assumptions
- Immutable Process: Once a position is marked for liquidation, the process will complete, regardless of any subsequent price movements that might improve the user’s Loan-to-Value (LTV) ratio.
- Account Lock: While a user’s position is being liquidated, they cannot perform any other actions like depositing, withdrawing, or borrowing.
- Full Liquidation: The entire position, including all types of collateral, is liquidated.
- Socialized Loss (v1): In the initial version, the protocol does not use an insurance fund. Any bad debt resulting from a liquidation is socialized among lenders by adjusting the supply index. This is v1 requirement arising from the PRD.
Data Structure Changes
To support the liquidation process, the following changes are made to the smart contract’s state.
The main contract state is updated with:
#![allow(unused)]
fn main() {
/// Account designated to handle collateral swaps.
pub liquidator_account: AccountId,
/// State of any ongoing liquidation.
pub liquidation: Option<LiquidationInfo>,
/// Tracks pending liquidations
pub pending_liquidations: Vector<UserId>
}
The InFlightOperation enum is extended to include liquidation states:
#![allow(unused)]
fn main() {
pub enum InFlightOperation {
Borrowing,
WithdrawingUsdc,
WithdrawingCollateral,
Liquidation
LiquidationFinal(Usdc)
}
}
A new LiquidationInfo struct tracks the state of an ongoing liquidation:
#![allow(unused)]
fn main() {
#[derive(Debug, Clone, PartialEq, Default)]
pub struct LiquidationInfo {
/// The user whose position is being liquidated.
pub user: UserId,
/// The current state of the liquidation process.
pub liquidation_state: LiquidationState,
}
}
The LiquidationState enum tracks the sub-steps within the collateral transfer phase:
#![allow(unused)]
fn main() {
pub enum LiquidationState {
#[default]
MarkedForLiquidation,
OngoingTransfer,
TransferSuccess,
TransferFailure(Vec<CollateralContract>),
}
}
Swap and Hold Account
The protocol uses a “Swap and Hold Account” during the liquidation process. This is a standard NEAR Account ID and does not require any special smart contract code.
This account is used to store the user’s collateral in an intents contract, which facilitates the swap from the collateral asset to USDC.
End-to-End Liquidation Flow
The liquidation process is a multi-stage operation orchestrated by an off-chain bot interacting with the main smart contract.
Stage 1: Position Flagging
- Monitor LTV: The bot continuously monitors each user’s LTV ratio off-chain.
- Initiate Liquidation: If a user’s LTV exceeds the liquidation threshold, the bot calls
liquidate_position(user_id)on the smart contract. This function marks the user for liquidation, records their current borrow value, and locks their account from further operations.
Stage 2: Collateral Transfer
- Iterate and Transfer: The smart contract initiates all collateral transfers at once. The bot calls
perform_transfer_for_liquidation(contracts: Option<Vec<CollateralContract>>)to initiate it.. - On-Chain Transfer: This contract call initiates an async transfer of the specified collateral from the protocol to the designated
liquidator_account. The contract updates the state toOngoingTransfer. - Handle Callbacks: The contract handles the async transfer’s callback:
- On success, the state is updated to
TransferSuccess. - On failure, the state is updated to
TransferFailurewith the collateral info, signaling the bot to retry the transfer for that specific asset.
- On success, the state is updated to
Stage 3: Asset Swapping (Off-Chain)
- Swap to USDC: Once the collateral is in the
liquidator_account, the bot uses an external service (e.g., 1Click API) to swap each collateral asset for USDC. - Hold Funds: The resulting USDC is temporarily held in a “Swap & Hold” contract controlled by the liquidator.
Stage 4: USDC Repatriation
- Transfer Back: After all collateral has been swapped, the bot triggers a transfer of the total accumulated USDC from the “Swap & Hold” contract back to the main protocol contract.
- Record Value: The main contract recognizes the incoming transfer is from the
liquidator_accountand records the amount in theswapped_collateral_valuefield of the user’sLiquidationInfo.
Stage 5: Finalizing Liquidation
- Finalize: With the USDC returned, the bot calls
finalize_liquidation(). - Settle Account: This function performs the final accounting: it repays the user’s debt, calculates and distributes liquidation fees, and handles any surplus or deficit. The user’s account is then unlocked.
Smart Contract Interface
liquidate_account(user_id)
Marks a user’s position for liquidation.
- Authorization: Can only be called by a permissioned liquidator bot account.
- Checks: Verifies that the user’s position is indeed eligible for liquidation based on their LTV.
- Actions:
- Creates a
LiquidationInfostruct for the user. - Sets
liquidation_statetoMarkedForLiquidation. - Stores the user’s current borrow value.
- Sets the user’s
in_flight_operationtoLiquidation, preventing other actions.
- Creates a
transfer_collateral_for_liquidation(ft_contract)
Transfers a specific collateral asset from the user’s position to the liquidator_account.
- Authorization: Callable by any account, allowing for permissionless retries.
- Pre-conditions:
- The user must be in a liquidation state (
MarkedForLiquidationorTransferFailure). - If the state is
TransferFailure(failed_contract), theft_contractparameter must matchfailed_contract. - The user must have a balance of the specified collateral (
ft_contract).
- The user must be in a liquidation state (
- Actions:
- Initiates an async transfer of the user’s full balance of
ft_contractto theliquidator_account. - Sets the
liquidation_statetoOngoingTransfer(ft_contract). - The callback updates the state to
TransferSuccessorTransferFailurebased on the outcome.
- Initiates an async transfer of the user’s full balance of
finalize_liquidation()
Settles the user’s account after collateral has been swapped and USDC has been returned to the contract.
- Authorization: Callable by any account, allowing for permissionless retries.
- Pre-conditions:
- Asserts that all of the user’s collateral has been transferred out (collateral balances are zero).
- Asserts that
swapped_collateral_valueis greater than zero.
- Actions:
- Repay Debt: The user’s borrowed shares are deducted from the protocol’s total.
- Calculate Fees: A liquidation penalty is calculated from
swapped_collatal_valueand split into liquidator and protocol fees. - Calculate Final Balance:
net_collateral = swapped_collateral_value - liquidator_fee - protocol_feefinal_balance = net_collateral - user_borrow_value
- Settlement:
- Surplus (
final_balance > 0): Fees are paid, and the remaining surplus is sent to the liquidated user. - Bad Debt (
final_balance < 0): Fees are paid from the swapped collateral. The shortfall is socialized among lenders by reducing the supply index.
- Surplus (
- Cleanup: The user’s
in_flight_operationis cleared and theLiquidationInfois removed.
Security Considerations
- A 1 yoctoNEAR deposit should be required for these calls to prevent call-based attacks (see NEAR documentation).
System Architecture
Introduction
This document provides a high-level overview of the Satoshi Lending Protocol’s architecture. For terminology and general workflow definitions, please refer to the Workflow Document.
Core Infrastructure
Oracle and Price Feeds
We utilize the Pyth Oracle to obtain real-time price information for collateral assets. Accurate price data is critical for the following operations:
- Borrowing
- Withdrawing collateral
- Liquidation
Note: User operations (and bots during liquidation) accept optional price data to update collateral prices before execution. Providing this data is highly recommended to prevent transaction failures due to stale prices.
Intents Contract
- Purpose: Exclusively handles asset swaps during the liquidation process.
- Interaction: The frontend should not interact with the Intents contract directly.
Frontend Workflows
This section details the interaction flows between the user/frontend and the smart contracts.
General Requirements
- Security Deposit: Most state-changing methods require attaching 1 yoctoNEAR as a security deposit.
- Storage Balance: Before interacting, ensure the user has a sufficient
storage_balanceregistered on the relevant contract (Satoshi contract or Fungible Token contract).
1. Deposit (Lending & Collateral)
Deposits of USDC (lending) and non-USDC assets (collateral) are initiated directly via the Fungible Token (FT) contract.
Workflow:
- Check Storage: Verify the user has a valid
storage_balanceon the Satoshi contract. If not, prompt the user to callstorage_deposit. - Verify Registration: Confirm the user is registered.
- External Deposit: User issues a deposit transaction on the deposit address of the external (non-Near) blockchain.
- Poll Transaction: The system polls the external transaction until it is confirmed successful. This is a two-step process: you have to poll that the external transaction succeeds, and poll that the bridging action occurs on the Near side. However, OmniBridge may provide a single endpoint to query for both.
- Contract Deposit: Once the external transaction is confirmed, the user initiates the deposit to the Satoshi contract.
- Update UI: Poll the transaction about it’s status and if was success/failure.
2. Unlending (Withdraw USDC)
Lenders can withdraw their USDC principal and accrued interest directly to their Near account.
Workflow:
- Check Storage: Verify the user has a valid
storage_balanceon the USDC Fungible Token contract. Register if necessary. - Execute Withdraw: Invoke the withdrawal method on the Satoshi contract (attach 1 yocto).
- Handle Result: Parse the transaction result (success or failure, e.g., insufficient liquidity) and display it to the user.
3. Borrow USDC / Withdraw Collateral
Borrowers can withdraw borrowed USDC or their deposited collateral.
Key Considerations:
- Price Freshness: It is mandatory to submit off-chain hex-encoded Pyth price feed data with the transaction. Failure to do so can cause the transaction to fail.
- Price Update: All price feeds for all collateral assets must be updated during this transaction.
Workflow:
- Check Storage: Verify the user has a valid
storage_balanceon the destination Fungible Token contract. Register if necessary. - Execute Transaction: Invoke the borrow or withdraw collateral method on the Satoshi contract (attach 1 yocto).
- Handle Result: Parse the transaction result and display it to the user.
4. Repay Loan
Borrowers can repay borrowed USDC plus accrued interest.
Key Considerations:
- Overpayment Strategy: The frontend should perform a slight overpayment. Since interest compounds continuously and the exact transaction timestamp is unknown, this ensures the entire debt is covered.
- Excess Refund: Any excess USDC provided beyond the actual debt amount is automatically returned to the borrower.
Workflow:
- Execute Repay: Invoke the repayment method on the Satoshi contract (attach 1 yocto).
- Handle Result: Parse the transaction result and display it to the user.
Off-Chain Services
Bot
The bot handles automated maintenance tasks for the protocol. Responsibilities:
- Monitoring: Track Near token balance of Liquidation bot and raise alerts if they fall below a defined threshold.
- Simulation & Marking: Perform off-chain simulations to identify and “mark” unhealthy positions. This involves calculating:
- Total Borrow Value: Adjusted for continuously accruing interest.
- Total Collateral Value: Based on the latest real-time Pyth price information.
- Liquidation: Execute liquidation on marked users, including passing the necessary off-chain Pyth price data.
Querier
Status: Pending input. (Responsibilities to be defined)
Indexer
Status: Pending input. (Responsibilities to be defined)
Indexer REST API
Status: Pending input. (Responsibilities to be defined)
Integration & Porting Guide
This document outlines the steps required to port the frontend from the old architecture to the new smart contract system.
Goals & Scope
The primary goal is to reach a functional state suitable for audit. The frontend must support the following workflows:
- User Actions:
- USDC Deposit
- Collateral Deposit
- Borrow USDC
- Withdraw USDC
- Withdraw Collateral
- Repayment of USDC
- State Display:
- Show current protocol state information.
Core Smart Contract Methods
To retrieve data, you will primarily interact with two view-only methods. It is essential to understand the data structures they return.
1. get_config
Returns ContractConfigView, which contains protocol configuration parameters.
#![allow(unused)]
fn main() {
pub struct ContractConfigView {
pub owner_id: AccountId,
pub liquidation_threshold: Decimal,
pub borrow_threshold: Decimal,
pub withdraw_threshold: Decimal,
pub liquidation_penalty: Decimal,
pub pyth_oracle_contract: AccountId,
pub usdc_base_borrow_rate: Decimal,
pub usdc_rate_multiplier: Decimal,
pub insurance_allocation_rate: Decimal,
pub liquidator_account: AccountId,
pub intents_contract: AccountId,
pub oracle_price_staleness_secs: u64,
pub supported_collaterals: HashMap<CollateralContract, CollateralMetadata>,
pub supported_usdc_token: Option<UsdcTokenView>,
pub pyth_required_deposit: NearToken,
}
}
2. get_contract_state
Returns ContractState, which contains the dynamic state of the protocol (liquidity, shares, indexes, etc.).
#![allow(unused)]
fn main() {
pub struct ContractState {
/// Protocol's cash-on-hand (available for withdrawal/borrowing).
pub usdc_liquidity: Usdc,
pub collateral_liquidity: IterableMap<CollateralContract, RawAmount>,
/// Total lending shares for USDC.
pub total_supplied_usdc_shares: LendingShare,
/// Total borrow shares for USDC.
pub total_borrowed_usdc_shares: BorrowShare,
/// User data
pub users: near_sdk::store::IterableMap<UserId, User>,
/// Index to track interest accrued for USDC suppliers.
/// User supply balance = `supplied_usdc_shares` * `usdc_supply_index`.
pub usdc_supply_index: LendingIndex,
/// Index to track interest accrued on USDC borrows.
/// User borrow balance = `borrowed_usdc_shares` * `usdc_borrow_index`.
pub usdc_borrow_index: BorrowIndex,
/// Timestamp of the last interest accrual.
pub last_interest_accrual_timestamp: Timestamp,
/// Protocol's accumulated bad debt in USDC.
pub bad_debt_usdc: Usdc,
/// Protocol's insurance fund.
pub insurance_fund: Usdc,
/// Oracle Prices.
pub prices: LookupMap<UsdPythIdentifier, PythPrice>,
/// State of any ongoing liquidation.
pub liquidation: Option<LiquidationInfo>,
/// Tracks pending liquidations.
pub pending_liquidations: Vector<UserId>,
/// Unpaid fees to be paid to the liquidator.
pub unpaid_liquidator_fee: Usdc,
/// Unpaid surplus amounts to be transferred to users after liquidation.
pub pending_surplus_transfers: LookupMap<UserId, Usdc>,
/// The number of users registered with the contract.
pub user_count: u64,
}
}
3. get_user(user_id: UserId)
Returns the User struct, containing specific data for a single user.
#![allow(unused)]
fn main() {
pub struct User {
// Amounts of non-USDC collateral.
pub collateral: HashMap<CollateralContract, RawAmount>,
// User's position in the USDC market (supplier, borrower, or neither).
pub usdc_position: UsdcPosition,
// The current in-flight operation for this user, if any.
pub in_flight_operation: Option<InFlightOperation>,
/// Storage balance
pub storage_balance: NearToken,
}
pub enum UsdcPosition {
#[default]
None,
Supplied(LendingShare),
Borrowed(BorrowShare),
}
}
Backend API Migration (Indexer & Querier)
This section maps old backend endpoints to the new logic using ContractState and ContractConfigView.
Summary Table
| Old Query | Endpoint | New Logic Summary |
|---|---|---|
transactionsQuery | /transactions/account/{accountId} | Deferred to V2 (Indexer API). |
indexerTotalBorrowedQuery | /borrows/total_borrowed | total_borrowed_usdc_shares * usdc_borrow_index |
indexerTotalFeesQuery | /fees/total/interest_and_penalties | insurance_fund + Liquidator Account Balance |
indexerAccountsQuery | /accounts | user_count |
indexerProtocolLtvQuery | /dashboard/ltv | Total Borrowed / Total Collateral Value |
indexerTokenCollateralQuery | /dashboard/token_collateral | Sum of all collateral values (USD). |
indexerTotalStablecoinDepositedQuery | /token_transfers/stablecoin/total_deposited | usdc_liquidity |
indexerTotalCollateralDepositedQuery | /token_transfers/collateral/total_deposited | Same as indexerTokenCollateralQuery. |
querierUtilizationRatioQuery | /utilization_ratio | Total Borrowed / Total Supplied |
querierLendableQuery | /lendable | usdc_liquidity |
Detailed Porting Guide
indexerTotalBorrowedQuery
Represents the total USDC lent out by the protocol.
- Source:
ContractState - Formula:
total_borrowed_usdc_shares * usdc_borrow_index
indexerTotalFeesQuery
Represents total liquidator and insurance fees collected.
- Source:
ContractState(for insurance fund) &ContractConfigView(for liquidator account ID). - Formula:
insurance_fund + (USDC balance of liquidator_account)
indexerAccountsQuery
Total number of registered users.
- Source:
ContractState - Formula:
user_count
indexerProtocolLtvQuery
Protocol Loan-to-Value ratio.
- Formula:
Total Borrowed Value / Total Collateral Value- Total Borrowed Value: See
indexerTotalBorrowedQuery. - Total Collateral Value:
- Get
collateral_liquidityfromContractState. - Fetch USD prices using Hermes.
- Normalize amounts based on token decimals.
- Sum:
(Amount * USD Price)for all collateral types.
- Get
- Total Borrowed Value: See
indexerTokenCollateralQuery & indexerTotalCollateralDepositedQuery
Total collateral present in the protocol (in USD).
- Formula: Same calculation as Total Collateral Value in
indexerProtocolLtvQuery.
indexerTotalStablecoinDepositedQuery
Total USDC present in the protocol.
- Source:
ContractState - Formula:
usdc_liquidity
querierUtilizationRatioQuery
- Source:
ContractState - Formula:
Total Borrowed / Total Supplied- Total Borrowed:
total_borrowed_usdc_shares * usdc_borrow_index - Total Supplied:
total_supplied_usdc_shares * usdc_supply_index
- Total Borrowed:
querierLendableQuery
Available USDC for lending.
- Source:
ContractState - Formula:
usdc_liquidity
Contract View Query Migration
This section maps old smart contract view methods to the new logic.
Summary Table
| Old Query | Old Method | New Logic Summary |
|---|---|---|
spBalanceOfCollateralQuery | balance_of_collateral | User.collateral (converted to USD). |
spBalanceOfBorrowQuery | balance_of_borrow | User.usdc_position (Borrowed) * usdc_borrow_index. |
spGetUserUnlentQuery | get_user_unlent | User.usdc_position (Supplied) * usdc_supply_index. |
spGetUserLentQuery | get_user_lent | Deprecated. (All deposits are now fully lent/supplied). |
spGetBorrowThresholdQuery | get_borrow_threshold | ContractConfigView.borrow_threshold. |
spGetWithdrawThresholdQuery | get_withdraw_threshold | ContractConfigView.withdraw_threshold. |
spGetLiquidationThresholdQuery | get_liquidation_threshold | ContractConfigView.liquidation_threshold. |
spGetLiquidationWarningThresholdQuery | get_liquidation_warning_threshold | Deprecated. Hardcode in frontend. |
spGetMaximumWithdrawableQuery | get_maximum_withdrawable | Client-side calculation (Collateral - Borrowed/Threshold). |
spGetCollateralValueQuery | get_collateral_value | User.collateral * Prices. |
spCalculateLtvQuery | calculate_ltv | User Borrowed Value / User Collateral Value. |
spGetAccumulatedInterestQuery | get_accumulated_interest | Deferred to V2 Indexer. |
spGetAnnualPercentageRateQuery | get_annual_percentage_rate | ContractConfigView.usdc_base_borrow_rate. |
spGetAnnualPercentageYieldQuery | get_annual_percentage_yield | Not Applicable. |
spGetMinimumBorrowableQuery | get_smaller_operations_amount | Hardcode in frontend. |
spGetMaximumBorrowableAmountQuery | composed | Borrowing Power - Current Borrow Value. |
spBalanceOfAllMainCollateralsQuery | composed | Aggregate User.collateral values. |
spIsAccountAtRiskQuery | is_account_at_risk | Client-side check: Current LTV > Hardcoded Limit. |
spGetAccountPendingLiquidationNotificationsQuery | … | Deprecated. |
Detailed Integration Guide
spBalanceOfCollateralQuery
Represents the collateral deposited by a User.
- Source:
Userstruct (collateralfield). - Logic: Iterate through the map. Use Hermes API to convert amounts to USD if total value is needed.
spBalanceOfBorrowQuery
Represents the amount borrowed by a User (including accrued interest).
- Source:
Userstruct (usdc_position) &ContractState(usdc_borrow_index). - Formula:
- If
usdc_positionisBorrowed(shares):shares * usdc_borrow_index.
- If
spGetUserUnlentQuery
Represents the total USDC supplied by the lender that can be withdrawn.
- Source:
Userstruct (usdc_position) &ContractState(usdc_supply_index). - Formula:
- If
usdc_positionisSupplied(shares):shares * usdc_supply_index.
- If
spGetBorrowThresholdQuery, spGetWithdrawThresholdQuery, spGetLiquidationThresholdQuery
- Source:
ContractConfigViewfields:borrow_thresholdwithdraw_thresholdliquidation_threshold
spGetMaximumWithdrawableQuery
Maximum amount (USDC) that can be withdrawn. Do note that this is an approximation of the maximum appoint since the current price fluctuating and interest also gets accumulated as seconds pass.
- Logic (USDC):
- Fetch Pyth/Hermes data.
- Perform client-side interest accrual (refer to Liquidator bot implementation for logic).
- Calculate total supplied balance (like
spGetUserUnlentQuery).
- Logic (Collateral - returned in USDC value):
- Fetch Pyth/Hermes data.
- Perform client-side interest accrual.
- Compute
Total Borrow Valueof user. - Compute
Total Collateral Valueof user. - Formula:
Total Collateral Value - (Total Borrow Value / withdraw_threshold)
spGetMaximumBorrowableAmountQuery
Maximum additional amount that can be borrowed.
- Formula:
Borrowing Power - Current Borrow ValueBorrowing Power:Total Collateral Value * borrow_thresholdCurrent Borrow Value:User Borrow Shares * Borrow Index
spGetAnnualPercentageRateQuery
Borrow rate at zero utilization.
- Source:
ContractConfigView.usdc_base_borrow_rate
User Actions (Transactions)
These are the write operations performed by the user.
Deposit
- USDC: Use
ft_transfer_callon the USDC token contract, passing the protocol contract as the receiver. - Collateral: Use
ft_transfer_callon the specific collateral token contract.
Withdraw
- USDC: Call
withdraw_usdcon the protocol contract. - Collateral: Call
withdraw_collateralon the protocol contract.
Borrow USDC
Call borrow_usdc on the protocol contract.
Repay USDC
Send USDC using ft_transfer_call on the USDC token contract to the protocol contract. The contract will automatically interpret this as a repayment.
When repaying as a borrower, the exact debt amount increases continuously due to interest accrual. Therefore, the frontend must calculate a slightly higher amount to ensure the repayment covers the debt at the moment of transaction execution.
Calculation Steps:
- Determine Current Borrow Value:
- Formula:
User Borrow Shares*usdc_borrow_index.
- Formula:
- Estimate Accrued Interest:
- Get the time elapsed since
last_interest_accrual_timestamp. - Estimate the interest accrued over this period (Liquidator bot logic has code that I wrote for estimation: https://github.com/Satoshi-Port/satoshi-port/blob/01a640d0b0789c8303623e4c82814f55a8249f91/rust/satoshi-bot/src/job_watcher/liquidation_scanner.rs#L25 Another alternative is to see the smart contract code but that’s more complicated IMO).
- Get the time elapsed since
- Apply Safety Buffer:
- Sum the Current Borrow Value and Estimated Interest.
- Add a 5% buffer:
(Borrow Value + Interest) * 1.05.
Send this calculated amount to ensure full repayment.
Wallets Documentation
This document outlines the various cryptocurrency wallets supported by our application, including integration details and testing resources.
Supported Wallets
The development team has tested and currently supports the following wallets:
NEAR Protocol
- MyNearWallet
- HotWallet
Ethereum
- MetaMask
- WalletConnect (via the MetaMask mobile application)
Integration Notes
WalletConnect
When integrating WalletConnect, there are currently two connection methods available (as seen on near.com):
- Via the NEAR widget
- Directly via WalletConnect

Important: Based on our testing, connecting WalletConnect via the NEAR widget does not work.
However, connecting directly via WalletConnect works successfully because it utilizes the Ethereum interface. Once signed in, you can verify this by attempting to withdraw an asset and inspecting the transaction details to confirm the network.

As shown in the transaction snapshot above, the network name confirms it operates on the Ethereum network.
Testing & Prior Art
To understand expected wallet behaviors and workflows, it is highly recommended to review the following implementations:
References
Infrastructure
This document outlines the third-party services and infrastructure components used by the protocol.
RPC Nodes
We utilize paid RPC nodes provided by FastNear.
| Usage | Details |
|---|---|
| Provider | FastNear (Paid Plan) |
| Consumers | Frontend Site, Bot |
- Status: https://status.fastnear.com/status/main
- Contact: Telegram
Near Data Server
This service is distinct from the standard RPC nodes.
- Provider: FastNear (Paid endpoint)
- Documentation: neardata-server on GitHub
- Usage: Indexer
- Status: https://status.fastnear.com/status/main
- Contact: Telegram
Hermes
We utilize a paid Hermes endpoint to fetch real-time price information.
- Type: Paid Endpoint
- Purpose: Price Feeds
- Consumers: Frontend, Bots
- Contact: Triton Pyth Levana group in Telegram, levana-pyth Slack channel
One Click
This service is utilized by our liquidation infrastructure.
- Usage: Liquidation Bots
- Purpose: Performing swaps on user collateral
- Status: https://status.near-intents.org/posts/dashboard
- Contact:
near-satoshi-portchannel in Slack
PoA Bridge
- Usage: Frontend
- Purpose: Deposits from external chains (excluding BTC)
- URL: https://bridge.chaindefuser.com/rpc
- Docs: Near Intents
- Status: https://status.near-intents.org/posts/dashboard
- Contact:
near-satoshi-portchannel in Slack
OmniBridge
- Usage: Frontend
- Purpose: External BTC deposits
- URL: https://mainnet.api.bridge.nearone.org
- Source: bridge-sdk-js on GitHub
- Status: https://status.near-intents.org/posts/dashboard
- Contact:
near-satoshi-portchannel in Slack
NowNodes API
- Usage: Frontend (through Indexer endpoints)
- Purpose: Finding information about BTC wallet address and transaction information
- Status: https://nownodes.site24x7statusiq.com/
- Contact: Telegram
Zendesk
- Usage: Frontend
- Purpose: Provides support chat
- Status: https://status.zendesk.com/
- Owner: Carla
Reown
- Usage: Frontend
- Purpose: For ethereum wallet
- Status: https://status.reown.com/
- Owner: Alejandro
Indexer Database Design
This document outlines the database schema design for the Indexer.
Goals
- Speed: Meet immediate requirements quickly.
- Extensibility (Secondary): Easy to support additional metrics in the future.
Custom Types (Enums)
To ensure data integrity and query readability, we use PostgreSQL enums for fixed sets of values.
-- Enum for operation types
CREATE TYPE operation_type_enum AS ENUM (
'DEPOSIT',
'WITHDRAW',
'BORROW',
'REPAY',
'LIQUIDATION'
);
-- Enum for operation status
CREATE TYPE operation_status_enum AS ENUM (
'PENDING',
'SUCCESS',
'FAILURE'
);
Core Entities
Users
Stores unique user account IDs referenced by other tables.
CREATE TABLE users (
id SERIAL PRIMARY KEY,
account_id TEXT NOT NULL UNIQUE
);
Design Decision: Integer Primary Key vs. Account ID
We use an auto-incrementing integer (id) as the primary key instead of the NEAR account_id string for the following reasons:
- Storage Efficiency:
SERIAL(integer) takes 4 bytes in foreign keys, whereas a NEARaccount_idcan be up to 64 bytes. - Join Performance: Joins on integers are generally faster than joins on variable-length text fields.
- Index Size: B-Tree indexes are more compact with integer keys.
Assets
Stores information about supported assets (collateral and lendable tokens).
CREATE TABLE assets (
id SERIAL PRIMARY KEY,
contract_id TEXT NOT NULL UNIQUE -- e.g., 'usdc.fakes.testnet'
);
Operations Log
Operations
A central log for every relevant on-chain operation. This table stores metadata common to all operations.
CREATE TABLE operations (
id BIGSERIAL PRIMARY KEY,
-- The user whose account is directly affected by this operation.
user_id INTEGER NOT NULL REFERENCES users(id),
-- The user who originally signed the transaction.
signer_id INTEGER NOT NULL REFERENCES users(id),
tx_hash TEXT,
block_height BIGINT NOT NULL,
block_timestamp TIMESTAMPTZ NOT NULL,
operation_type operation_type_enum NOT NULL,
status operation_status_enum NOT NULL
);
CREATE INDEX ON operations (user_id);
Receipt Mapping
Maps any receipt ID in a promise chain to the single operation it belongs to.
CREATE TABLE receipt_to_operation_map (
receipt_id TEXT PRIMARY KEY,
operation_id BIGINT NOT NULL REFERENCES operations(id),
status operation_status_enum NOT NULL
);
CREATE INDEX ON receipt_to_operation_map (operation_id);
Workflow: Linking Receipts to Operations
- Initial Processing: When the ingester processes the first receipt of a multi-step operation (e.g.,
WithdrawCollateral), it creates a row in theoperationstable withstatus = 'PENDING'. - RPC Lookup: The ingester makes an RPC call to retrieve all receipts associated with the transaction. (Note: The current lake framework does not expose the full receipt chain, so we rely on RPC nodes).
- Mapping Creation: Entries are created in
receipt_to_operation_mapfor the current receipt ID and any generatedpromise_receipt_id, linking them to the newly createdoperation_id. - Callback Processing:
- Intermediate callbacks (e.g., Pyth price checks) can be ignored if not relevant.
- The final callback (e.g.,
on_withdraw_collateral_callback) is correlated using the transaction hash and receipt ID to update the operation status. - RPC data helps disambiguate cases where multiple identical operations (same user, same amount) occur close together.
Operation Details
Specific tables for detailed data related to each operation type.
-- For deposits
CREATE TABLE deposits (
operation_id BIGINT PRIMARY KEY REFERENCES operations(id),
asset_id INTEGER NOT NULL REFERENCES assets(id),
amount NUMERIC(40, 0) NOT NULL -- NUMERIC for precision with large integers
);
-- For withdrawals
CREATE TABLE withdrawals (
operation_id BIGINT PRIMARY KEY REFERENCES operations(id),
asset_id INTEGER NOT NULL REFERENCES assets(id),
amount NUMERIC(40, 0) NOT NULL
);
-- For borrowing actions
CREATE TABLE borrows (
operation_id BIGINT PRIMARY KEY REFERENCES operations(id),
amount NUMERIC(40, 0) NOT NULL
);
Transaction Failures
Tracks user-initiated transactions that failed before generating a successful execution receipt.
CREATE TABLE transaction_failures (
tx_hash TEXT PRIMARY KEY,
signer_id INTEGER NOT NULL REFERENCES users(id),
block_height BIGINT NOT NULL,
block_timestamp TIMESTAMPTZ NOT NULL,
operation_type operation_type_enum NOT NULL,
amount NUMERIC(40, 0),
asset_id INTEGER REFERENCES assets(id)
);
Resource Access Guide
This document outlines the procedures for accessing various project resources and environments.
Staging Database (Indexer)
This section details how to connect to the Staging environment database used by the Indexer.
Prerequisites
- Cluster Access: Ensure you have access to the Kube360 cluster.
- Credentials: Obtain the necessary database credentials. Contact Sibi if you do not have them.
Connection Steps
Run the following commands in your terminal to access the database pod:
-
Configure your shell for the cluster (replace
fishwith your preferred shell if necessary):k3 kubeconfig fish -
Launch a temporary pod with a PostgreSQL client:
kubectl run psql-client --rm -it --image=ubuntu -- /bin/bash -
Inside the pod, install the PostgreSQL client:
apt update && apt install -y postgresql-client -
Connect to the database:
psql -h satoshi-staging-ro.satoshi-sandbox.svc.cluster.local -U indexer -d indexerv2
Example Usage
Once connected, you can execute SQL queries. For example:
SELECT operation_id
FROM receipt_to_operation_map
WHERE receipt_id = 'Dyy1BVtx6Zd5B8RUzVoq4zk9p7C94Zo8int9T4eqQcXg';
Services & Infrastructure
This document outlines the internal infrastructure and services running the Satoshi Protocol.
Environments
We operate two primary environments: Staging and Mainnet.
Note on Network Usage
Both environments run on the Near Mainnet. This configuration is necessary because:
- Near Intents, required for our liquidation logic, is unavailable on Testnet.
- Deposit workflows can only be fully tested on Mainnet.
Developers are still encouraged to use Testnet for general Near blockchain familiarity.
Core Components
Each environment relies on the following core components:
- Smart Contract: The deployed lending protocol logic.
- Bots: Services that continuously monitor the protocol for liquidations.
- Indexer: Ingests blockchain blocks and provides REST API services to the frontend.
- Frontend: The web interface for interacting with the smart contract.
Staging Environment
Current deployment status and endpoints for the Staging environment:
| Service | URL |
|---|---|
| Frontend Website | https://beta.sailorlend.com |
| Bots Status | https://bots-staging.sailorlend.com/status |
| Indexer Ingester Status | https://indexer-ingester-staging.sailorlend.com/status |
| Indexer REST API Health | https://indexer-rest-api-staging.sailorlend.com/healthz |
We have two Slack channels to monitor the health of the applications in Staging environment:
- sp-staging-monitoring: All crash alerts of the application from health-check go there.
- sp-staging-notifications: Any task failures or downtime of an application goes to this channel.
Mainnet Environment
Current deployment status and endpoints for the Mainnet environment:
| Service | URL |
|---|---|
| Frontend Website | https://app.sailorlend.com |
| Bots Status | https://bots-mainnet.sailorlend.com/status |
| Indexer Ingester Status | https://indexer-ingester-mainnet.sailorlend.com/status |
| Indexer REST API Health | https://indexer-rest-api-mainnet.sailorlend.com/healthz |
We have two Slack channels to monitor the health of the applications in Staging environment:
- sp-mainnet-monitoring: All crash alerts of the application from health-check go there.
- sp-mainnet-notifications: Any task failures or downtime of an application goes to this channel.
Production Deployment Guide
This document outlines the steps required for deploying the Satoshi Port application to production, covering the Smart Contract, Frontend, and Backend components.
Contract Deployment
Prerequisites
- Private Keys: You need the private keys to deploy a new smart contract. Ask Sibi or Michael for access.
Deployment Steps
- Trigger CI: Push a new tag to the
developbranch. - Obtain Artifact: Wait for the CI job to complete. It will produce a new WASM file for the smart contract (see an example release).
- Update Configuration: Update the contract version accordingly in the production.justfile.
- Deploy: Run the following command to deploy the newer version of the contract:
Note: Ensure you handle any necessary state migration upgrades if applicable.just prod::deploy
Frontend Deployment
Frontend deployment is managed using Cloudflare Pages.
- The
mainbranch serves as the source of truth for production. - To trigger a deployment, create a pull request for your changes to the
mainbranch.
Backend Deployment
Backend deployments are managed via the devops repository.
Deployment Steps
- Update the Docker image version in the kustomization.yaml file.
- The deployment should then be synced via K3s ArgoCD.
Monitoring & Operations
- Documentation: For more details, refer to the Kube360 cluster documentation.
- Alerts: You should join the
k3s-alertmangerSlack channel to monitor cluster alerts. Ask Sibi or Noris to be added to the channel.
API Playgrounds
This page contains several API playgrounds. These are provided as Org
mode files (.org) which can be downloaded and experimented with
interactively in Emacs using Org
babel.
OneClick API
One Click API
* Fetch all addresses
#+begin_src http :pretty
GET https://1click.chaindefuser.com/v0/tokens
#+end_src
#+RESULTS:
#+begin_example
[
{
"assetId": "nep141:wrap.near",
"decimals": 24,
"blockchain": "near",
"symbol": "wNEAR",
"price": 1.29,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "wrap.near"
},
{
"assetId": "nep141:eth.bridge.near",
"decimals": 18,
"blockchain": "near",
"symbol": "ETH",
"price": 2134.72,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "eth.bridge.near"
},
{
"assetId": "nep141:853d955acef822db058eb8505911ed77f175b99e.factory.bridge.near",
"decimals": 18,
"blockchain": "near",
"symbol": "FRAX",
"price": 0.990756,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "853d955acef822db058eb8505911ed77f175b99e.factory.bridge.near"
},
{
"assetId": "nep141:aaaaaa20d9e0e2461697782ef11675f668207961.factory.bridge.near",
"decimals": 18,
"blockchain": "near",
"symbol": "AURORA",
"price": 0.03006597,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "aaaaaa20d9e0e2461697782ef11675f668207961.factory.bridge.near"
},
{
"assetId": "nep141:2260fac5e5542a773aa44fbcfedf7c193bc2c599.factory.bridge.near",
"decimals": 8,
"blockchain": "near",
"symbol": "wBTC",
"price": 72892,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "2260fac5e5542a773aa44fbcfedf7c193bc2c599.factory.bridge.near"
},
{
"assetId": "nep141:blackdragon.tkn.near",
"decimals": 24,
"blockchain": "near",
"symbol": "BLACKDRAGON",
"price": 7.025E-9,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "blackdragon.tkn.near"
},
{
"assetId": "nep141:token.0xshitzu.near",
"decimals": 18,
"blockchain": "near",
"symbol": "SHITZU",
"price": 0.0008705,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "token.0xshitzu.near"
},
{
"assetId": "nep141:abg-966.meme-cooking.near",
"decimals": 18,
"blockchain": "near",
"symbol": "ABG",
"price": 0,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "abg-966.meme-cooking.near"
},
{
"assetId": "nep141:noear-324.meme-cooking.near",
"decimals": 18,
"blockchain": "near",
"symbol": "NOEAR",
"price": 0,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "noear-324.meme-cooking.near"
},
{
"assetId": "nep141:mpdao-token.near",
"decimals": 6,
"blockchain": "near",
"symbol": "mpDAO",
"price": 0.01402528,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "mpdao-token.near"
},
{
"assetId": "nep141:zec.omft.near",
"decimals": 8,
"blockchain": "zec",
"symbol": "ZEC",
"price": 233.96,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:jambo-1679.meme-cooking.near",
"decimals": 18,
"blockchain": "near",
"symbol": "JAMBO",
"price": 0.0003258652122193554,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "jambo-1679.meme-cooking.near"
},
{
"assetId": "nep141:kat.token0.near",
"decimals": 18,
"blockchain": "near",
"symbol": "NearKat",
"price": 0.00006052,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "kat.token0.near"
},
{
"assetId": "nep141:gnear-229.meme-cooking.near",
"decimals": 18,
"blockchain": "near",
"symbol": "GNEAR",
"price": 0,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "gnear-229.meme-cooking.near"
},
{
"assetId": "nep141:test-token.highdome3013.near",
"decimals": 8,
"blockchain": "near",
"symbol": "TESTNEBULA",
"price": 0,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "test-token.highdome3013.near"
},
{
"assetId": "nep141:token.rhealab.near",
"decimals": 18,
"blockchain": "near",
"symbol": "RHEA",
"price": 0.01170606,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "token.rhealab.near"
},
{
"assetId": "nep141:token.publicailab.near",
"decimals": 18,
"blockchain": "near",
"symbol": "PUBLIC",
"price": 0.01492108,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "token.publicailab.near"
},
{
"assetId": "nep141:d9c2d319cd7e6177336b0a9c93c21cb48d84fb54.factory.bridge.near",
"decimals": 18,
"blockchain": "near",
"symbol": "HAPI",
"price": 0.459232,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "d9c2d319cd7e6177336b0a9c93c21cb48d84fb54.factory.bridge.near"
},
{
"assetId": "nep141:itlx.intellex_xyz.near",
"decimals": 24,
"blockchain": "near",
"symbol": "ITLX",
"price": 0.0003500398829195208,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "itlx.intellex_xyz.near"
},
{
"assetId": "nep141:cfi.consumer-fi.near",
"decimals": 18,
"blockchain": "near",
"symbol": "CFI",
"price": 0.0007207,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "cfi.consumer-fi.near"
},
{
"assetId": "nep141:npro.nearmobile.near",
"decimals": 24,
"blockchain": "near",
"symbol": "NPRO",
"price": 0.2020732318988625,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "npro.nearmobile.near"
},
{
"assetId": "nep141:eth-0xdac17f958d2ee523a2206206994597c13d831ec7.omft.near",
"decimals": 6,
"blockchain": "eth",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
},
{
"assetId": "nep141:eth-0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.omft.near",
"decimals": 6,
"blockchain": "eth",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
{
"assetId": "nep141:eth-0xaaaaaa20d9e0e2461697782ef11675f668207961.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "AURORA",
"price": 0.03006597,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xaaaaaa20d9e0e2461697782ef11675f668207961"
},
{
"assetId": "nep141:eth.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "ETH",
"price": 2134.72,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:sui.omft.near",
"decimals": 9,
"blockchain": "sui",
"symbol": "SUI",
"price": 0.968445,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:btc.omft.near",
"decimals": 8,
"blockchain": "btc",
"symbol": "BTC",
"price": 72892,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:eth-0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf.omft.near",
"decimals": 8,
"blockchain": "eth",
"symbol": "cbBTC",
"price": 72851,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf"
},
{
"assetId": "nep141:sol.omft.near",
"decimals": 9,
"blockchain": "sol",
"symbol": "SOL",
"price": 91.66,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near",
"decimals": 18,
"blockchain": "arb",
"symbol": "ARB",
"price": 0.103797,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x912ce59144191c1204e64559fe8253a0e49e6548"
},
{
"assetId": "nep141:doge.omft.near",
"decimals": 8,
"blockchain": "doge",
"symbol": "DOGE",
"price": 0.095828,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:xrp.omft.near",
"decimals": 6,
"blockchain": "xrp",
"symbol": "XRP",
"price": 1.44,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:token.sweat",
"decimals": 18,
"blockchain": "near",
"symbol": "SWEAT",
"price": 0.00063585,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "token.sweat"
},
{
"assetId": "nep141:eth-0xdefa4e8a7bcba345f687a2f1456f5edd9ce97202.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "KNC",
"price": 0.13546,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xdefa4e8a7bcba345f687a2f1456f5edd9ce97202"
},
{
"assetId": "nep141:eth-0xa35923162c49cf95e6bf26623385eb431ad920d3.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "TURBO",
"price": 0.00101132,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xa35923162c49cf95e6bf26623385eb431ad920d3"
},
{
"assetId": "nep141:sol-b9c68f94ec8fd160137af8cdfe5e61cd68e2afba.omft.near",
"decimals": 6,
"blockchain": "sol",
"symbol": "$WIF",
"price": 0.217412,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm"
},
{
"assetId": "nep141:sol-57d087fd8c460f612f8701f5499ad8b2eec5ab68.omft.near",
"decimals": 6,
"blockchain": "sol",
"symbol": "BOME",
"price": 0.00042277,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "ukHH6c7mMyiWCf1b9pnWe25TSpkDDt3H5pQZgZ74J82"
},
{
"assetId": "nep141:sol-c58e6539c2f2e097c251f8edf11f9c03e581f8d4.omft.near",
"decimals": 6,
"blockchain": "sol",
"symbol": "TRUMP",
"price": 3.35,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
},
{
"assetId": "nep141:eth-0x6b175474e89094c44da98b954eedeac495271d0f.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "DAI",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x6b175474e89094c44da98b954eedeac495271d0f"
},
{
"assetId": "nep141:gnosis-0x9c58bacc331c9aa871afd802db6379a98e80cedb.omft.near",
"decimals": 18,
"blockchain": "gnosis",
"symbol": "GNO",
"price": 135,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x9c58bacc331c9aa871afd802db6379a98e80cedb"
},
{
"assetId": "nep141:gnosis-0x177127622c4a00f3d409b75571e12cb3c8973d3c.omft.near",
"decimals": 18,
"blockchain": "gnosis",
"symbol": "COW",
"price": 0.250654,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x177127622c4a00f3d409b75571e12cb3c8973d3c"
},
{
"assetId": "nep141:eth-0x5afe3855358e112b5647b952709e6165e1c1eeee.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "SAFE",
"price": 0.105812,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x5afe3855358e112b5647b952709e6165e1c1eeee"
},
{
"assetId": "nep141:eth-0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "AAVE",
"price": 117.68,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
},
{
"assetId": "nep141:eth-0x1f9840a85d5af5bf1d1762f925bdaddc4201f984.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "UNI",
"price": 4.04,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
},
{
"assetId": "nep141:eth-0x514910771af9ca656af840dff83e8264ecf986ca.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "LINK",
"price": 9.39,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x514910771af9ca656af840dff83e8264ecf986ca"
},
{
"assetId": "nep141:starknet.omft.near",
"decimals": 18,
"blockchain": "starknet",
"symbol": "STRK",
"price": 0.04088352,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:bera.omft.near",
"decimals": 18,
"blockchain": "bera",
"symbol": "BERA",
"price": 0.538138,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:56_11111111111111111111",
"decimals": 18,
"blockchain": "bsc",
"symbol": "BNB",
"price": 658.39,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:56_12zbnsg6xndDVj25QyL82YMPudb",
"decimals": 18,
"blockchain": "bsc",
"symbol": "ASTER",
"price": 0.756873,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x000ae314e2a2172a039b26378814c252734f556a"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:143_11111111111111111111",
"decimals": 18,
"blockchain": "monad",
"symbol": "MON",
"price": 0.02284219,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:196_11111111111111111111",
"decimals": 18,
"blockchain": "xlayer",
"symbol": "OKB",
"price": 78.28,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:9745_11111111111111111111",
"decimals": 18,
"blockchain": "plasma",
"symbol": "XPL",
"price": 0.117661,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:137_11111111111111111111",
"decimals": 18,
"blockchain": "pol",
"symbol": "POL",
"price": 0.102795,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:base-0x98d0baa52b2d063e780de12f615f963fe8537553.omft.near",
"decimals": 18,
"blockchain": "base",
"symbol": "KAITO",
"price": 0.359878,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x98d0baa52b2d063e780de12f615f963fe8537553"
},
{
"assetId": "nep141:tron.omft.near",
"decimals": 6,
"blockchain": "tron",
"symbol": "TRX",
"price": 0.284179,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:1117_",
"decimals": 9,
"blockchain": "ton",
"symbol": "TON",
"price": 1.36,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:10_vLAiSt9KfUGKpw5cD3vsSyNYBo7",
"decimals": 18,
"blockchain": "op",
"symbol": "OP",
"price": 0.127384,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x4200000000000000000000000000000000000042"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:43114_11111111111111111111",
"decimals": 18,
"blockchain": "avax",
"symbol": "AVAX",
"price": 9.45,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:1100_111bzQBB5v7AhLyPMDwS8uJgQV24KaAPXtwyVWu2KXbbfQU6NXRCz",
"decimals": 7,
"blockchain": "stellar",
"symbol": "XLM",
"price": 0.159553,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:eth-0x2260fac5e5542a773aa44fbcfedf7c193bc2c599.omft.near",
"decimals": 8,
"blockchain": "eth",
"symbol": "WBTC",
"price": 72602,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"
},
{
"assetId": "nep141:cardano.omft.near",
"decimals": 6,
"blockchain": "cardano",
"symbol": "ADA",
"price": 0.273859,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:aptos.omft.near",
"decimals": 8,
"blockchain": "aptos",
"symbol": "APT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:ltc.omft.near",
"decimals": 8,
"blockchain": "ltc",
"symbol": "LTC",
"price": 56.01,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:eth-0xe0f63a424a4439cbe457d80e4f4b51ad25b2c56c.omft.near",
"decimals": 8,
"blockchain": "eth",
"symbol": "SPX",
"price": 0.360308,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xe0f63a424a4439cbe457d80e4f4b51ad25b2c56c"
},
{
"assetId": "nep141:bch.omft.near",
"decimals": 8,
"blockchain": "bch",
"symbol": "BCH",
"price": 462.78,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:eth-0x8b1484d57abbe239bb280661377363b03c89caea.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "ADI",
"price": 3.16,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x8b1484d57abbe239bb280661377363b03c89caea"
},
{
"assetId": "nep141:eth-0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "SHIB",
"price": 0.00000564,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce"
},
{
"assetId": "nep141:eth-0x6982508145454ce325ddbe47a25d4ec3d2311933.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "PEPE",
"price": 0.00000354,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x6982508145454ce325ddbe47a25d4ec3d2311933"
},
{
"assetId": "nep141:eth-0xdef1b2d939edc0e4d35806c59b3166f790175afe.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "INX",
"price": 0.01273616,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xdef1b2d939edc0e4d35806c59b3166f790175afe"
},
{
"assetId": "nep141:sol-0xaad74c68eecfc9f8c5bdcea614f6167048c795ef.omdep.near",
"decimals": 6,
"blockchain": "sol",
"symbol": "PENGU",
"price": 0.00735201,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv"
},
{
"assetId": "nep141:base-0xe62bfbe57763ec24c0f130426f34dbce11fc5b06.omft.near",
"decimals": 18,
"blockchain": "base",
"symbol": "TITN",
"price": 0.02615349,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xe62bfbe57763ec24c0f130426f34dbce11fc5b06"
},
{
"assetId": "nep141:aleo.omft.near",
"decimals": 6,
"blockchain": "aleo",
"symbol": "ALEO",
"price": 0.067354,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:dash.omft.near",
"decimals": 8,
"blockchain": "dash",
"symbol": "DASH",
"price": 34.8,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:tron-d28a265909efecdcee7c5028585214ea0b96f015.omft.near",
"decimals": 6,
"blockchain": "tron",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
},
{
"assetId": "nep141:sol-c800a4bd850783ccb82c2b2c7e84175443606352.omft.near",
"decimals": 6,
"blockchain": "sol",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
},
{
"assetId": "nep141:nbtc.bridge.near",
"decimals": 8,
"blockchain": "near",
"symbol": "BTC",
"price": 72892,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "nbtc.bridge.near"
},
{
"assetId": "nep141:sol-91914f13d3b54f8126a2824d71632d4b078d7403.omft.near",
"decimals": 8,
"blockchain": "sol",
"symbol": "xBTC",
"price": 72892,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "CtzPWv73Sn1dMGVU3ZtLv9yWSyUAanBni19YWDaznnkn"
},
{
"assetId": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"decimals": 6,
"blockchain": "near",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1"
},
{
"assetId": "nep141:usdt.tether-token.near",
"decimals": 6,
"blockchain": "near",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "usdt.tether-token.near"
},
{
"assetId": "nep141:a35923162c49cf95e6bf26623385eb431ad920d3.factory.bridge.near",
"decimals": 18,
"blockchain": "near",
"symbol": "TURBO",
"price": 0.00101132,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "a35923162c49cf95e6bf26623385eb431ad920d3.factory.bridge.near"
},
{
"assetId": "nep141:arb.omft.near",
"decimals": 18,
"blockchain": "arb",
"symbol": "ETH",
"price": 2134.72,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near",
"decimals": 6,
"blockchain": "arb",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xaf88d065e77c8cc2239327c5edb3a432268e5831"
},
{
"assetId": "nep141:arb-0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9.omft.near",
"decimals": 6,
"blockchain": "arb",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"
},
{
"assetId": "nep141:base.omft.near",
"decimals": 18,
"blockchain": "base",
"symbol": "ETH",
"price": 2134.72,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:base-0x833589fcd6edb6e08f4c7c32d4f71b54bda02913.omft.near",
"decimals": 6,
"blockchain": "base",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
},
{
"assetId": "nep141:sol-5ce3bf3a31af18be40ba30f721101b4341690186.omft.near",
"decimals": 6,
"blockchain": "sol",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
},
{
"assetId": "nep141:sol-df27d7abcc1c656d4ac3b1399bbfbba1994e6d8c.omft.near",
"decimals": 8,
"blockchain": "sol",
"symbol": "TURBO",
"price": 0.00101132,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "2Dyzu65QA9zdX1UeE7Gx71k7fiwyUK6sZdrvJ7auq5wm"
},
{
"assetId": "nep141:gnosis.omft.near",
"decimals": 18,
"blockchain": "gnosis",
"symbol": "xDAI",
"price": 0.999991,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:gnosis-0x2a22f9c3b484c3629090feed35f17ff8f88f76f0.omft.near",
"decimals": 6,
"blockchain": "gnosis",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x2a22f9c3b484c3629090feed35f17ff8f88f76f0"
},
{
"assetId": "nep141:gnosis-0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1.omft.near",
"decimals": 18,
"blockchain": "gnosis",
"symbol": "WETH",
"price": 2134.72,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1"
},
{
"assetId": "nep141:gnosis-0x4ecaba5870353805a9f068101a40e0f32ed605c6.omft.near",
"decimals": 6,
"blockchain": "gnosis",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x4ecaba5870353805a9f068101a40e0f32ed605c6"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:137_qiStmoQJDQPTebaPjgx5VBxZv6L",
"decimals": 6,
"blockchain": "pol",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:137_3hpYoaLtt8MP1Z2GH1U473DMRKgr",
"decimals": 6,
"blockchain": "pol",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:56_2w93GqMcEmQFDru84j3HZZWt557r",
"decimals": 18,
"blockchain": "bsc",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:56_2CMMyVTGZkeyNZTSvS5sarzfir6g",
"decimals": 18,
"blockchain": "bsc",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x55d398326f99059ff775485246999027b3197955"
},
{
"assetId": "nep141:purge-558.meme-cooking.near",
"decimals": 18,
"blockchain": "near",
"symbol": "PURGE",
"price": 0.00140864,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "purge-558.meme-cooking.near"
},
{
"assetId": "nep141:eth-0xd9c2d319cd7e6177336b0a9c93c21cb48d84fb54.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "HAPI",
"price": 0.459232,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xd9c2d319cd7e6177336b0a9c93c21cb48d84fb54"
},
{
"assetId": "nep141:base-0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf.omft.near",
"decimals": 8,
"blockchain": "base",
"symbol": "cbBTC",
"price": 72851,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf"
},
{
"assetId": "nep141:base-0x227d920e20ebac8a40e7d6431b7d724bb64d7245.omft.near",
"decimals": 18,
"blockchain": "base",
"symbol": "SWEAT",
"price": 0.00063585,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x227d920e20ebac8a40e7d6431b7d724bb64d7245"
},
{
"assetId": "nep141:eth-0xb4b9dc1c77bdbb135ea907fd5a08094d98883a35.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "SWEAT",
"price": 0.00063585,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xb4b9dc1c77bdbb135ea907fd5a08094d98883a35"
},
{
"assetId": "nep141:arb-0xca7dec8550f43a5e46e3dfb95801f64280e75b27.omft.near",
"decimals": 18,
"blockchain": "arb",
"symbol": "SWEAT",
"price": 0.00063585,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xca7dec8550f43a5e46e3dfb95801f64280e75b27"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:56_28V9BijGeZDBFEEtkAcnJo4tPRH4",
"decimals": 18,
"blockchain": "bsc",
"symbol": "SWEAT",
"price": 0.00063585,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x510ad22d8c956dcc20f68932861f54a591001283"
},
{
"assetId": "nep141:aptos-88cb7619440a914fe6400149a12b443c3ac21d59.omft.near",
"decimals": 6,
"blockchain": "aptos",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b"
},
{
"assetId": "nep141:aptos-34ee497f210c5a511e8d5b53bc56d75b63612bb5.omft.near",
"decimals": 6,
"blockchain": "aptos",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:10_11111111111111111111",
"decimals": 18,
"blockchain": "op",
"symbol": "ETH",
"price": 2134.72,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:10_359RPSJVdTxwTJT9TyGssr2rFoWo",
"decimals": 6,
"blockchain": "op",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:10_A2ewyUyDp6qsue1jqZsGypkCxRJ",
"decimals": 6,
"blockchain": "op",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x0b2c639c533813f4aa9d7837caf62653d097ff85"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:43114_372BeH7ENZieCaabwkbWkBiTTgXp",
"decimals": 6,
"blockchain": "avax",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:43114_3atVJH3r5c4GqiSYmg9fECvjc47o",
"decimals": 6,
"blockchain": "avax",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:1117_3tsdfyziyc7EJbP2aULWSKU4toBaAcN4FdTgfm5W1mC4ouR",
"decimals": 6,
"blockchain": "ton",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs"
},
{
"assetId": "nep141:sui-c1b81ecaf27933252d31a963bc5e9458f13c18ce.omft.near",
"decimals": 6,
"blockchain": "sui",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:1100_111bzQBB65GxAPAVoxqmMcgYo5oS3txhqs1Uh1cgahKQUeTUq1TJu",
"decimals": 7,
"blockchain": "stellar",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:56_24S22V8GMmQN8t6PbCdRb3mBewAd",
"decimals": 18,
"blockchain": "bsc",
"symbol": "RHEA",
"price": 0.01170606,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x4c067de26475e1cefee8b8d1f6e2266b33a2372e"
},
{
"assetId": "nep141:sol-1f00bb36e75cfc8e1274c1507cc3054f5b3f3ce1.omft.near",
"decimals": 9,
"blockchain": "sol",
"symbol": "PUBLIC",
"price": 0.01492108,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "AXCp86262ZPfpcV9bmtmtnzmJSL5sD99mCVJD4GR9vS"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:56_SZzgw3HSudhZcTwPWUTi2RJB19t",
"decimals": 18,
"blockchain": "bsc",
"symbol": "NEAR",
"price": 1.29,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x1fa4a73a3f0133f0025378af00236f3abdee5d63"
},
{
"assetId": "nep141:sol-c634d063ceff771aff0c972ec396fd915a6bbd0e.omft.near",
"decimals": 8,
"blockchain": "sol",
"symbol": "SPX",
"price": 0.360308,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "J3NKxxXZcnNiMjKw9hYb2K4LUxgwB6t1FtPtQVsv3KFr"
},
{
"assetId": "nep141:base-0x1c4a802fd6b591bb71daa01d8335e43719048b24.omft.near",
"decimals": 6,
"blockchain": "base",
"symbol": "sUSDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x1c4a802fd6b591bb71daa01d8335e43719048b24"
},
{
"assetId": "nep141:sol-2dc7b64e5dd3c717fc85abaf51cdcd4b18687f09.omft.near",
"decimals": 6,
"blockchain": "sol",
"symbol": "sUSDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "3tMdx4g4grCgqHjELqALfTPnZnG1BLwsPntD3tGREgvp"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:143_4EJiJxSALvGoTZbnc8K7Ft9533et",
"decimals": 6,
"blockchain": "monad",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xe7cd86e13ac4309349f30b3435a9d337750fc82d"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:143_2dmLwYWkCQKyTjeUPAsGJuiVLbFx",
"decimals": 6,
"blockchain": "monad",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x754704bc059f8c67012fed69bc8a327a5aafb603"
},
{
"assetId": "nep141:bera-0x779ded0c9e1022225f8e0630b35a9b54be713736.omft.near",
"decimals": 6,
"blockchain": "bera",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x779ded0c9e1022225f8e0630b35a9b54be713736"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:196_2fezDCvVYRsG8wrK6deJ2VRPiAS1",
"decimals": 6,
"blockchain": "xlayer",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x779ded0c9e1022225f8e0630b35a9b54be713736"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:196_2dK9kLNR7Ekq7su8FxNGiUW3djTw",
"decimals": 6,
"blockchain": "xlayer",
"symbol": "USDC",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x74b7f16337b8972027f6196a17a631ac6de26d22"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:9745_3aL9skCy1yhPoDB8oKMmRHRN7SJW",
"decimals": 6,
"blockchain": "plasma",
"symbol": "USDT",
"price": 1,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:36900_11111111111111111111",
"decimals": 18,
"blockchain": "adi",
"symbol": "ADI",
"price": 3.16,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z"
},
{
"assetId": "nep141:gnosis-0x4d18815d14fe5c3304e87b3fa18318baa5c23820.omft.near",
"decimals": 18,
"blockchain": "gnosis",
"symbol": "SAFE",
"price": 0.105812,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x4d18815d14fe5c3304e87b3fa18318baa5c23820"
},
{
"assetId": "nep141:aleo-usad.omft.near",
"decimals": 6,
"blockchain": "aleo",
"symbol": "USAD",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "usad"
},
{
"assetId": "nep141:aleo-usdcx.omft.near",
"decimals": 6,
"blockchain": "aleo",
"symbol": "USDCx",
"price": 0.9999,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "usdcx"
},
{
"assetId": "nep141:meta-pool.near",
"decimals": 24,
"blockchain": "near",
"symbol": "stNEAR",
"price": 1.9,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "meta-pool.near"
},
{
"assetId": "nep141:arb-0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a.omft.near",
"decimals": 18,
"blockchain": "arb",
"symbol": "GMX",
"price": 7.33,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a"
},
{
"assetId": "nep141:eth-0xaaee1a9723aadb7afa2810263653a34ba2c21c7a.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "MOG",
"price": 1.68674E-7,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xaaee1a9723aadb7afa2810263653a34ba2c21c7a"
},
{
"assetId": "nep141:base-0x532f27101965dd16442e59d40670faf5ebb142e4.omft.near",
"decimals": 18,
"blockchain": "base",
"symbol": "BRETT",
"price": 0.00770814,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x532f27101965dd16442e59d40670faf5ebb142e4"
},
{
"assetId": "nep141:base-0xa5c67d8d37b88c2d88647814da5578128e2c93b2.omft.near",
"decimals": 18,
"blockchain": "base",
"symbol": "FMS",
"price": 0.00006695,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xa5c67d8d37b88c2d88647814da5578128e2c93b2"
},
{
"assetId": "nep141:sol-d600e625449a4d9380eaf5e3265e54c90d34e260.omft.near",
"decimals": 6,
"blockchain": "sol",
"symbol": "MELANIA",
"price": 0.108953,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "FUAfBo2jgks6gB4Z4LfZkqSZgzNucisEHqnNebaRxM1P"
},
{
"assetId": "nep141:sol-bb27241c87aa401cc963c360c175dd7ca7035873.omft.near",
"decimals": 6,
"blockchain": "sol",
"symbol": "LOUD",
"price": 0.00037445,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "EJZJpNa4tDZ3kYdcRZgaAtaKm3fLJ5akmyPkCaKmfWvd"
},
{
"assetId": "nep141:gnosis-0x420ca0f9b9b604ce0fd9c18ef134c705e5fa3430.omft.near",
"decimals": 18,
"blockchain": "gnosis",
"symbol": "EURe",
"price": 1.17,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x420ca0f9b9b604ce0fd9c18ef134c705e5fa3430"
},
{
"assetId": "nep141:gnosis-0x5cb9073902f2035222b9749f8fb0c9bfe5527108.omft.near",
"decimals": 18,
"blockchain": "gnosis",
"symbol": "GBPe",
"price": 1.34,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x5cb9073902f2035222b9749f8fb0c9bfe5527108"
},
{
"assetId": "nep141:eth-0xfa2b947eec368f42195f24f36d2af29f7c24cec2.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "USDf",
"price": 0.997592,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xfa2b947eec368f42195f24f36d2af29f7c24cec2"
},
{
"assetId": "nep141:eth-0x8d0d000ee44948fc98c9b98a4fa4921476f08b0d.omft.near",
"decimals": 18,
"blockchain": "eth",
"symbol": "USD1",
"price": 0.998651,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x8d0d000ee44948fc98c9b98a4fa4921476f08b0d"
},
{
"assetId": "nep141:stjack.tkn.primitives.near",
"decimals": 18,
"blockchain": "near",
"symbol": "STJACK",
"price": 0.00006695,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "stjack.tkn.primitives.near"
},
{
"assetId": "nep245:v2_1.omni.hot.tg:56_3NNshCLCt8r8E7x9FoDuiwoNQWgp",
"decimals": 18,
"blockchain": "bsc",
"symbol": "EVAA",
"price": 0.467391,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0xaa036928c9c0df07d525b55ea8ee690bb5a628c1"
},
{
"assetId": "1cs_v1:sol:spl:A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS",
"decimals": 8,
"blockchain": "sol",
"symbol": "ZEC",
"price": 233.96,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS"
},
{
"assetId": "1cs_v1:near:nep141:zec.omft.near",
"decimals": 8,
"blockchain": "near",
"symbol": "ZEC",
"price": 233.96,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "zec.omft.near"
},
{
"assetId": "1cs_v1:base:erc20:0x0382e3fee4a420bd446367d468a6f00225853420",
"decimals": 18,
"blockchain": "base",
"symbol": "CFI",
"price": 0.0007207,
"priceUpdatedAt": "2026-03-05T12:09:00.346Z",
"contractAddress": "0x0382e3fee4a420bd446367d468a6f00225853420"
}
]
#+end_example
* Swap quote (Dry run, failure scenarios)
For solana, amount should be 1000.
| Token | Min amount |
|--------+------------|
| Solana | 1250000 |
| ZEC | 10000 |
| BTC | 39 |
#+begin_src sh :results verbatim
date -u -d "+10 minute" +"%Y-%m-%dT%H:%M:%S.%3NZ"
#+end_src
#+RESULTS:
: 2026-03-12T12:04:18.189Z
#+begin_src http :pretty :var TOKEN=(getenv "ONE_CLICK_API_TOKEN")
POST https://1click.chaindefuser.com/v0/quote
Content-Type: application/json
Authorization: Bearer ${TOKEN}
{
"dry": true,
"depositMode": "SIMPLE",
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:sol.omft.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "1250000000000",
"refundTo": "satoshifpblockdev.near",
"refundType": "INTENTS",
"recipient": "satoshifpblockdev.near",
"recipientType": "INTENTS",
"deadline": "2026-03-12T12:04:18.189Z",
"referral": "referral",
"quoteWaitingTimeMs": 3000
}
#+end_src
#+RESULTS:
#+begin_example
{
"quote": {
"amountIn": "1250000000000",
"amountInFormatted": "1250.0",
"amountInUsd": "108650.0000",
"minAmountIn": "1250000000000",
"amountOut": "108170027891",
"amountOutFormatted": "108170.027891",
"amountOutUsd": "108160.0762",
"minAmountOut": "107088327612",
"timeEstimate": 10
},
"quoteRequest": {
"dry": true,
"depositMode": "SIMPLE",
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:sol.omft.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "1250000000000",
"refundTo": "satoshifpblockdev.near",
"refundType": "INTENTS",
"recipient": "satoshifpblockdev.near",
"recipientType": "INTENTS",
"deadline": "2026-03-12T12:04:18.189Z",
"referral": "referral",
"quoteWaitingTimeMs": 3000
},
"signature": "ed25519:38ACw4N545oTZ5gkLn8vmdYY9vZmdHLLGcAEizocqtJc443Kn2pYidMHKLfk5fxVRoZ1MTScivcgHoRn1WjifTwd",
"timestamp": "2026-03-12T11:54:38.047Z",
"correlationId": "bae2c4ec-e515-464c-a7fd-bd2f0b46350e"
}
#+end_example
#+begin_src http :pretty :var TOKEN=(getenv "ONE_CLICK_API_TOKEN")
POST https://1click.chaindefuser.com/v0/quote
Content-Type: application/json
Authorization: Bearer ${TOKEN}
{
"dry": true,
"depositMode": "SIMPLE",
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:sol.omft.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "10000",
"refundTo": "satoshifpblockdev.near",
"refundType": "INTENTS",
"recipient": "satoshifpblockdev.near",
"recipientType": "INTENTS",
"deadline": "2026-02-13T03:09:18.218Z",
"referral": "referral",
"quoteWaitingTimeMs": 3000
}
#+end_src
#+RESULTS:
: {
: "message": "Amount is too low for bridge, try at least 1250000",
: "correlationId": "811fb65c-5a31-4f1c-b6d8-4bb0b35b655e",
: "timestamp": "2026-02-13T02:59:29.110Z",
: "path": "/v0/quote"
: }
*** BTC lower bound
#+begin_src http :pretty :var TOKEN=(getenv "ONE_CLICK_API_TOKEN")
POST https://1click.chaindefuser.com/v0/quote
Content-Type: application/json
Authorization: Bearer ${TOKEN}
{
"dry": true,
"depositMode": "SIMPLE",
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:nbtc.bridge.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "41",
"refundTo": "satoshifpblockdev.near",
"refundType": "INTENTS",
"recipient": "satoshifpblockdev.near",
"recipientType": "INTENTS",
"deadline": "2026-02-19T12:28:39.583Z",
"referral": "referral",
"quoteWaitingTimeMs": 3000
}
#+end_src
#+RESULTS:
#+begin_example
{
"quote": {
"amountIn": "41",
"amountInFormatted": "0.00000041",
"amountInUsd": "0.0273",
"minAmountIn": "41",
"amountOut": "25913",
"amountOutFormatted": "0.025913",
"amountOutUsd": "0.0259",
"minAmountOut": "25653",
"timeEstimate": 10
},
"quoteRequest": {
"dry": true,
"depositMode": "SIMPLE",
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:nbtc.bridge.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "41",
"refundTo": "satoshifpblockdev.near",
"refundType": "INTENTS",
"recipient": "satoshifpblockdev.near",
"recipientType": "INTENTS",
"deadline": "2026-02-19T12:28:39.583Z",
"referral": "referral",
"quoteWaitingTimeMs": 3000
},
"signature": "ed25519:44UTpTzyLd3UQbDwgHYXEY69gB1F4iArCR6yvRp7Ya6ZHqxr8g545UYgeoMHgeWrZzep9tmbv8ZYVsB5aEGRnJJc",
"timestamp": "2026-02-19T12:19:33.010Z",
"correlationId": "3109e7af-b8f3-41b2-a100-3897869340cb"
}
#+end_example
#+begin_src http :pretty :var TOKEN=(getenv "ONE_CLICK_API_TOKEN")
POST https://1click.chaindefuser.com/v0/quote
Content-Type: application/json
Authorization: Bearer ${TOKEN}
{
"dry": true,
"depositMode": "SIMPLE",
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:zec.omft.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "10000",
"refundTo": "satoshifpblockdev.near",
"refundType": "INTENTS",
"recipient": "satoshifpblockdev.near",
"recipientType": "INTENTS",
"deadline": "2026-02-13T03:28:48.337Z",
"referral": "referral",
"quoteWaitingTimeMs": 3000
}
#+end_src
#+RESULTS:
#+begin_example
{
"quote": {
"amountIn": "10000",
"amountInFormatted": "0.0001",
"amountInUsd": "0.0232",
"minAmountIn": "10000",
"amountOut": "23089",
"amountOutFormatted": "0.023089",
"amountOutUsd": "0.0231",
"minAmountOut": "22858",
"timeEstimate": 10
},
"quoteRequest": {
"dry": true,
"depositMode": "SIMPLE",
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:zec.omft.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "10000",
"refundTo": "satoshifpblockdev.near",
"refundType": "INTENTS",
"recipient": "satoshifpblockdev.near",
"recipientType": "INTENTS",
"deadline": "2026-02-13T03:28:48.337Z",
"referral": "referral",
"quoteWaitingTimeMs": 3000
},
"signature": "ed25519:zneyYZZVfqXWYbyqo7xSGrAaJRBi93xB4TKn7AJU5fhhoHsyKu2xVxsDoYyr3GQvuottbVmXeUezmAhVBoP1Zki",
"timestamp": "2026-02-13T03:22:54.868Z",
"correlationId": "4ed40cb1-21e9-478f-8e6b-b4d0d47edc5b"
}
#+end_example
*** Lower bound for zec
#+RESULTS:
#+begin_example
{
"quote": {
"amountIn": "39",
"amountInFormatted": "0.00000039",
"amountInUsd": "0.0259",
"minAmountIn": "39",
"amountOut": "24641",
"amountOutFormatted": "0.024641",
"amountOutUsd": "0.0246",
"minAmountOut": "24394",
"timeEstimate": 10
},
"quoteRequest": {
"dry": true,
"depositMode": "SIMPLE",
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:zec.omft.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "39",
"refundTo": "satoshifpblockdev.near",
"refundType": "INTENTS",
"recipient": "satoshifpblockdev.near",
"recipientType": "INTENTS",
"deadline": "2026-02-13T03:28:48.337Z",
"referral": "referral",
"quoteWaitingTimeMs": 3000
},
"signature": "ed25519:2MqaqSiuFdvuuXrnmwSDHwbwfwsY8XU8hjNAwuaxW5QZ88jw3q4r3VFNQdVvBNydzfm2ti7PVxrwnZDRp9inXafb",
"timestamp": "2026-02-13T03:20:19.442Z",
"correlationId": "0a94d41c-b28f-4bc1-813f-ec5006df5268"
}
#+end_example
* Request swap quote (dry run)
** Two minutes
#+begin_src sh :results verbatim
date -u -d "+10 minute" +"%Y-%m-%dT%H:%M:%S.%3NZ"
#+end_src
#+RESULTS:
: 2026-02-13T03:28:48.337Z
#+begin_src http :pretty :var TOKEN=(getenv "ONE_CLICK_API_TOKEN")
POST https://1click.chaindefuser.com/v0/quote
Content-Type: application/json
Authorization: Bearer ${TOKEN}
{
"dry": true,
"depositMode": "SIMPLE",
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:sol.omft.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "1250000",
"refundTo": "satoshifpblockdev.near",
"refundType": "INTENTS",
"recipient": "satoshifpblockdev.near",
"recipientType": "INTENTS",
"deadline": "2026-02-12T03:15:20.817Z",
"referral": "referral",
"quoteWaitingTimeMs": 3000
}
#+end_src
#+RESULTS:
#+begin_example
{
"quote": {
"amountIn": "1250000",
"amountInFormatted": "0.00125",
"amountInUsd": "0.1004",
"minAmountIn": "1250000",
"amountOut": "100356",
"amountOutFormatted": "0.100356",
"amountOutUsd": "0.1003",
"minAmountOut": "99352",
"timeEstimate": 10
},
"quoteRequest": {
"dry": true,
"depositMode": "SIMPLE",
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:sol.omft.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "1250000",
"refundTo": "satoshifpblockdev.near",
"refundType": "INTENTS",
"recipient": "satoshifpblockdev.near",
"recipientType": "INTENTS",
"deadline": "2026-02-12T03:15:20.817Z",
"referral": "referral",
"quoteWaitingTimeMs": 3000
},
"signature": "ed25519:48F3Ceq4MZ9J3BUaXs8DtfcJAiCPujP2nC1mBTHJWFSeic8iWc3hEqtatKzBnuAxfVhKzzNJgNSxWNSsbFvDwPmc",
"timestamp": "2026-02-12T03:14:42.503Z",
"correlationId": "aa256ad6-de01-4af8-ae6c-962fc96d415b"
}
#+end_example
* Request swap quote (wet run)
** Two minutes
#+begin_src sh :results verbatim
date -u -d "+1 minute" +"%Y-%m-%dT%H:%M:%S.%3NZ"
#+end_src
#+RESULTS:
: 2026-02-12T07:55:52.915Z
#+begin_src http :pretty :var TOKEN=(getenv "ONE_CLICK_API_TOKEN")
POST https://1click.chaindefuser.com/v0/quote
Content-Type: application/json
Authorization: Bearer ${TOKEN}
{
"dry": false,
"depositMode": "SIMPLE",
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:sol.omft.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "1250000",
"refundTo": "06dce1859c0abdb688e378fd1dddeb0ac96eeff32f09720da9230aae9242183a",
"refundType": "INTENTS",
"recipient": "06dce1859c0abdb688e378fd1dddeb0ac96eeff32f09720da9230aae9242183a",
"recipientType": "INTENTS",
"deadline": "2026-02-12T07:55:52.915Z",
"referral": "referral",
"quoteWaitingTimeMs": 3000
}
#+end_src
#+RESULTS:
#+begin_example
{
"quote": {
"amountIn": "1250000",
"amountInFormatted": "0.00125",
"amountInUsd": "0.1009",
"minAmountIn": "1250000",
"amountOut": "100697",
"amountOutFormatted": "0.100697",
"amountOutUsd": "0.1007",
"minAmountOut": "99690",
"timeEstimate": 10,
"deadline": "2026-02-13T07:55:03.853Z",
"timeWhenInactive": "2026-02-13T07:55:03.853Z",
"depositAddress": "a6c78ddb2ccded78778e4924c820a6b4abf25248d199ed09f7a73f0ad447ff81"
},
"quoteRequest": {
"dry": false,
"depositMode": "SIMPLE",
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:sol.omft.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "1250000",
"refundTo": "06dce1859c0abdb688e378fd1dddeb0ac96eeff32f09720da9230aae9242183a",
"refundType": "INTENTS",
"recipient": "06dce1859c0abdb688e378fd1dddeb0ac96eeff32f09720da9230aae9242183a",
"recipientType": "INTENTS",
"deadline": "2026-02-12T07:55:52.915Z",
"referral": "referral",
"quoteWaitingTimeMs": 3000
},
"signature": "ed25519:3NRArBb6KNS5xTAmcQ1DtJMSXWkAVRD6oMkH9fQZ443xp4aUgwvZJyoRsZSk2SqddDNygmaNqFU9s4wC9hPahHfS",
"timestamp": "2026-02-12T07:55:00.765Z",
"correlationId": "b0f680b2-b41d-41f5-8a2b-9ec1ba3eacdc"
}
#+end_example
* Check status (Non working)
#+begin_src http :pretty :var TOKEN=(getenv "ONE_CLICK_API_TOKEN")
GET https://1click.chaindefuser.com/v0/status?depositAddress=b9924a833709018fd5e006b4f6268c09643f6d800374513ab0044b90bb0443f4
Content-Type: application/json
Authorization: Bearer ${TOKEN}
#+end_src
#+RESULTS:
#+begin_example
{
"status": "PENDING_DEPOSIT",
"updatedAt": "2026-02-12T03:31:31.390Z",
"swapDetails": {
"depositedAmount": null,
"depositedAmountUsd": null,
"depositedAmountFormatted": null,
"intentHashes": [],
"nearTxHashes": [],
"amountIn": null,
"amountInFormatted": null,
"amountInUsd": null,
"amountOut": null,
"amountOutFormatted": null,
"amountOutUsd": null,
"slippage": null,
"refundedAmount": "0",
"refundedAmountFormatted": "0",
"refundedAmountUsd": "0",
"refundReason": null,
"originChainTxHashes": [],
"destinationChainTxHashes": []
},
"quoteResponse": {
"timestamp": "2026-02-12T03:31:28.342Z",
"signature": "ed25519:2MYrc5WQdDq51tGNm2NR8RZdKJP22erzjUkKtqMGVJWPTAAXtPRsFXEVNtztyDttZrxtrucXoD18hGR6H7cJYAC3",
"quoteRequest": {
"dry": false,
"swapType": "EXACT_INPUT",
"depositMode": "SIMPLE",
"slippageTolerance": 100,
"originAsset": "nep141:sol.omft.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "1250000",
"refundTo": "satoshifpblockdev.near",
"refundType": "INTENTS",
"recipient": "satoshifpblockdev.near",
"recipientType": "INTENTS",
"deadline": "2026-02-12T03:32:15.646Z",
"appFees": [],
"virtualChainRecipient": null,
"virtualChainRefundRecipient": null,
"referral": "referral"
},
"quote": {
"amountIn": "1250000",
"amountInFormatted": "0.00125",
"amountInUsd": "0.1002",
"minAmountIn": "1250000",
"amountOut": "100119",
"amountOutFormatted": "0.100119",
"amountOutUsd": "0.1001",
"minAmountOut": "99117",
"timeWhenInactive": "2026-02-13T03:31:31.388Z",
"depositAddress": "b9924a833709018fd5e006b4f6268c09643f6d800374513ab0044b90bb0443f4",
"deadline": "2026-02-13T03:31:31.388Z",
"timeEstimate": 10
}
},
"correlationId": "916e17d5-b9e0-4df9-aec1-7a0f6815a365"
}
#+end_example
* Working
#+begin_src http :pretty :var TOKEN=(getenv "ONE_CLICK_API_TOKEN")
GET https://1click.chaindefuser.com/v0/status?depositAddress=a6c78ddb2ccded78778e4924c820a6b4abf25248d199ed09f7a73f0ad447ff81
Content-Type: application/json
Authorization: Bearer ${TOKEN}
#+end_src
#+RESULTS:
#+begin_example
{
"status": "SUCCESS",
"updatedAt": "2026-02-12T07:55:34.000Z",
"swapDetails": {
"depositedAmount": "1250000",
"depositedAmountUsd": "0.1009",
"depositedAmountFormatted": "0.00125",
"intentHashes": [
"5QQes8yrNDDX1naWYBB8qhiD9g2Rteq36ZrmRQB9gZ7L"
],
"nearTxHashes": [
"FS1o9dKgVc6pcwYFZZLSzvyaLbmS8yJApMUS8xFK9emQ",
"3xDzEoBwGipKaoUrxRy2Hbboxmbovj9isuU9yTEhLztk"
],
"amountIn": "1250000",
"amountInFormatted": "0.00125",
"amountInUsd": "0.1009",
"amountOut": "100735",
"amountOutFormatted": "0.100735",
"amountOutUsd": "0.1007",
"slippage": -4,
"refundedAmount": "0",
"refundedAmountFormatted": "0",
"refundedAmountUsd": "0",
"refundReason": null,
"originChainTxHashes": [],
"destinationChainTxHashes": [
{
"hash": "3xDzEoBwGipKaoUrxRy2Hbboxmbovj9isuU9yTEhLztk",
"explorerUrl": ""
}
]
},
"quoteResponse": {
"timestamp": "2026-02-12T07:55:00.765Z",
"signature": "ed25519:3NRArBb6KNS5xTAmcQ1DtJMSXWkAVRD6oMkH9fQZ443xp4aUgwvZJyoRsZSk2SqddDNygmaNqFU9s4wC9hPahHfS",
"quoteRequest": {
"dry": false,
"swapType": "EXACT_INPUT",
"depositMode": "SIMPLE",
"slippageTolerance": 100,
"originAsset": "nep141:sol.omft.near",
"depositType": "INTENTS",
"destinationAsset": "nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
"amount": "1250000",
"refundTo": "06dce1859c0abdb688e378fd1dddeb0ac96eeff32f09720da9230aae9242183a",
"refundType": "INTENTS",
"recipient": "06dce1859c0abdb688e378fd1dddeb0ac96eeff32f09720da9230aae9242183a",
"recipientType": "INTENTS",
"deadline": "2026-02-12T07:55:52.915Z",
"appFees": [],
"virtualChainRecipient": null,
"virtualChainRefundRecipient": null,
"referral": "referral"
},
"quote": {
"amountIn": "1250000",
"amountInFormatted": "0.00125",
"amountInUsd": "0.1009",
"minAmountIn": "1250000",
"amountOut": "100697",
"amountOutFormatted": "0.100697",
"amountOutUsd": "0.1007",
"minAmountOut": "99690",
"timeWhenInactive": "2026-02-13T07:55:03.853Z",
"depositAddress": "a6c78ddb2ccded78778e4924c820a6b4abf25248d199ed09f7a73f0ad447ff81",
"deadline": "2026-02-13T07:55:03.853Z",
"timeEstimate": 10
}
},
"correlationId": "75edc5c2-ce2a-43de-b185-a071e566ee37"
}
#+end_example
Hermes API
Hermes API
* Hermes API
** Fetch prices
#+begin_src http :pretty
GET https://hermes.pyth.network/v2/updates/price/latest?ids[]=e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43&ids[]=0xef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d&ids[]=be9b59d178f0d6a97ab4c343bff2aa69caa1eaae3e9048a65788c529b125bb24
#+end_src
#+RESULTS:
#+begin_example
{
"binary": {
"encoding": "hex",
"data": [
"504e41550100000003b801000000040d00aea882a64ffc8170fddb88d22dcfe132134d5e1623c6a0eecd4bee340d5f94fe3fd51d2c68eeec40754ad2564fcb517a7a934e2bf6328510cd627d925c28b071000294e747640779e87b01b3c52aa5c3b96dd6ea3baaa8ceaa5865e5c6bc8f285b21683b6baf78b807e18e387d9d3e5470aa6fca126b0c18e55f0119bd1a909511e00003565c6b350d0cfdbbd4c54a1a8553010bdbf79541c5036c0a52060996345df94539560407c1b1a0130527c4a40cf47aaa81626b00eb4b2a69c1a5dbf02ed3f79400048dc600c2a9ee9d1feee3920bc798b035bd1657250da4523c0d671bc51867ae0018dec989244b984a707c81e0bf0e87164bf6b0ec8171636bda7246facccf5dc3000690c71f0ba534c221d57222e3394edc746f5a40a97c08663294c37e9f4f41b16d1573dc21adf606c1f1dbcbd31901d0925e3d10acc7ccc530f8c2af20adca49b70008b606654e776fa982829f3c97ecc84b25ed8fd10d956716466687b109ca593f1772e4d8a392b3b7b7d9759baf21eb8fe3714456974e787629d5ded8fa5981fc93010aadc19bae020081abbac29b8c55bb48b4c33b8d9da95f9373ce7f3bfd9dd9fa7d26fe39d8d894f5818c615cf2aba1ca25b229e97e42a434808fb88361a10d3ac6000b2f5bb214d14a5a4a620db617fb37094c9c3a12df8f6b1af9c47d457d67e6305e2d8ea3d9a7ec97802d56ae499bd974074573ca93a6834fabc428484b7ae891c0010c1b91f1f0bea0af86d177c3d14450901b9b1e27e12ab62f0ae6cf0b7971bec1d56568c952e6a66fcfb8591eba250d6c9568a91e62eb002387a984dd63ae3efed8000dd1be0f5ace2357dfa44ed50f9bec7e72ae8a3e80862396d76078ea5462ff37855101ee3b14c9cce6e354da03c7dec57e94de61406724206f65b136576f573547010e002d6497f1c636f3c43d6ea764f822bea8c1dc808ce49bec1c69c98fe0a425cb238199cffddc643b5d2ff38c0d90a567ab16839ea71e69d924fe4191c4e9a25e000f4f80b2d46fc723925e70f5349bd1ce10c1f20d2524b8d240bb48c4205f9464b0730cb008a0aa974f4c8585c6f08c60a4518eecb1b5906ecea6d2e2e029ec25ca0110949a8527c6ad63ea7e440acbfdf102433c51642733f7d604545feff69d7712316795187f81714322876f00b4d7f9ab50c9dd1ac5ff3c61efab9d840fecd5465801698eee5d00000000001ae101faedac5851e32b9b23b5f9411a8c2bac4aae3ed4dd7b811dd1a72ea4aa71000000000b36fa17014155575600000000001044a2f800002710f7a93cbc5473f9da4658d5732bf9098e9f201ae403005500e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43000006113833ce5100000000b58c49eefffffff800000000698eee5d00000000698eee5c0000060bb6e57d2000000000a5e815840d70b906f6565a446d95530b7861041f5d1ee65c27708a1d5dd6f8e12160b8f712aad40a08a9bb7eb359ab4186a811dfe84b8bfa0ad5d9a8be731d4544e9ab96f27bfaf964e0cb8327ea09ebde549ead24b531b572180cbd5c36b1eccb2241e446a8bb905e1d4bd2172eff88c307970ec670e85edc459bc14ff6274515b844d735f6ee022dbd6ee421b3cded76b698d24246a07d678b3d7fcb3217645f12288e268ae1dd5442b8c57603a34cca399839d89c6255e547f2f1cc2ec99c790aad79b289db492b9a374c935bd2a2af9c94da7e2edb66602ae44b18cdc617fbf8409b2fcdcbfb3a65834c6a76592a2a0d66fc556d7791ccacdcdcd0c2dd4f0ef9e0ce9880daf5b9005500ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d00000001dabf7e33000000000038babefffffff800000000698eee5d00000000698eee5c00000001d840280400000000004c4d750d4a57570fd67cd820ce94ced9febd84703448f8b69d5687f176dea28152cf040284e266d679c9f5a7c23f411470e1b3d9f3fc66103c0781979991350c05ef47402289cef64a28d47814149b54f6a29f3d402f50690bf55d60022226ea183c7828d9bb3f30e49ef5c23a3de20d871881396f4150504c34b820687e9bfade683489b9d77d68d08fc64bfd5baa101c8418a7f7296b14f925cba1b4877de906ec695b8ae1dd5442b8c57603a34cca399839d89c6255e547f2f1cc2ec99c790aad79b289db492b9a374c935bd2a2af9c94da7e2edb66602ae44b18cdc617fbf8409b2fcdcbfb3a65834c6a76592a2a0d66fc556d7791ccacdcdcd0c2dd4f0ef9e0ce9880daf5b9005500be9b59d178f0d6a97ab4c343bff2aa69caa1eaae3e9048a65788c529b125bb24000000056e69c80d00000000020a8a93fffffff800000000698eee5d00000000698eee5c0000000566a266900000000001fb2ad70d66d9b543427c42640132ad558589ab2e08230da0b3b70b3d104e99977353d9f0cd767cf3d47cb0ea73861f4c09a8f388ebae346651323c7fa27750534a6306a1cc7dfa1a444b859d6163de3d50ab3c89e9efda13455dcc937ee180efcc4f83f00217f6976928000d8cfc93bddbfa2a3d1caa05b93f91629723098e8a718c8206970a0821df08a38fc19c842a804ae83bb60a50764e58106494770568a3750bc2c53c9840575e9511e74d575f269ef7d7c290f1ee83c9f665fc6fee3a5967c0e749b2ce77a3b8d1235bd2a2af9c94da7e2edb66602ae44b18cdc617fbf8409b2fcdcbfb3a65834c6a76592a2a0d66fc556d7791ccacdcdcd0c2dd4f0ef9e0ce9880daf5b9"
]
},
"parsed": [
{
"id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43",
"price": {
"price": "6671027129937",
"conf": "3045870062",
"expo": -8,
"publish_time": 1770974813
},
"ema_price": {
"price": "6647382900000",
"conf": "2783450500",
"expo": -8,
"publish_time": 1770974813
},
"metadata": {
"slot": 272933624,
"proof_available_time": 1770974814,
"prev_publish_time": 1770974812
}
},
{
"id": "ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d",
"price": {
"price": "7964950067",
"conf": "3717822",
"expo": -8,
"publish_time": 1770974813
},
"ema_price": {
"price": "7923050500",
"conf": "5000565",
"expo": -8,
"publish_time": 1770974813
},
"metadata": {
"slot": 272933624,
"proof_available_time": 1770974814,
"prev_publish_time": 1770974812
}
},
{
"id": "be9b59d178f0d6a97ab4c343bff2aa69caa1eaae3e9048a65788c529b125bb24",
"price": {
"price": "23327262733",
"conf": "34245267",
"expo": -8,
"publish_time": 1770974813
},
"ema_price": {
"price": "23196755600",
"conf": "33237719",
"expo": -8,
"publish_time": 1770974813
},
"metadata": {
"slot": 272933624,
"proof_available_time": 1770974814,
"prev_publish_time": 1770974812
}
}
]
}
#+end_example
Another:
#+begin_src http :pretty
GET https://hermes-beta.pyth.network/v2/updates/price/latest?ids[]=f9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b&ids[]=ca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a6&ids[]=683832447e2920e3d85ab52609be9822ad0da95de656b8acd9a8f0e3a3717895
#+end_src
#+RESULTS:
#+begin_example
{
"binary": {
"encoding": "hex",
"data": [
"504e41550100000000a001000000000100b271359a8f27b655106cf9d9a4aaf7b4719181157302be51c02fb213e036942241331699754f9e4793597bd0f82984bd3c78430203fb11ee77c787b2bd9e9ad001698eee2400000000001ae101faedac5851e32b9b23b5f9411a8c2bac4aae3ed4dd7b811dd1a72ea4aa71000000000b9c7d6f014155575600000000001031dc6b0000271025765532bd5adf8b85f1981089936006808aa68403005500f9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b00000611319ff19b00000000577c7d5afffffff800000000698eee2400000000698eee240000060b1b5ebb000000000077639af80d3b1282c1d96f21d576d5790ac477406ae4be6c7e45de047521780517a9711ecd5cae68bcbd10de4de3a01d3b0f4e3c43c651de7a877f6f4637b0cf422b97117def9154913c1a4b4d592b9caf3e57a1beeee7c502681ca650d56cbb2e8be9114cdc5ac84f5a27cb75e934c421f899095d9068c20f17ba83340818e9dea492dc439d99e9ed63015cae0ed366ad84808b4cb6277da473efee859b719b1183e0f7fdcf5ad8908c2e3849f9c0f17c872c63a6d1cfdbbd0b98ea3f2c1f09243ac4a2bb1e72e8f5e5e16a814acefc68e38f2eaf00c4cf9e36a9e8562176dce76478165bb2d50eed069708bab1328ff492d6bd7a1b4016396a68a7b5ad81db3f4683d49be690db9d005500ca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a60000002d963b5881000000000510ff3efffffff800000000698eee2400000000698eee240000002d5a699448000000000492a4ee0dc88bc293fcebaec5cb6cadc8c548f964c7995852bcae93ea3b0ee0de025f9b104594882da48b0ce65738184384af6c37accb78d32da01c2b1517287cdf34cfa18af349580686eca267952ef4331a6cd611fee87ef5407b55bc572e89fd57cf5fd59bf645b7d5729498202ceabc5fb27e650fd040b40e3b1ba2149af8389161c534bf082bcb6a995be3cfd0ca2b688e872ca330f55e4451df52adb7ba1bbadef8ad1a0762c2e02f43541a97959b9d23accb4c79e1e05d6aec339ed7106dbc615015b90a779c2a7bbb4acefc68e38f2eaf00c4cf9e36a9e8562176dce76478165bb2d50eed069708bab1328ff492d6bd7a1b4016396a68a7b5ad81db3f4683d49be690db9d005500683832447e2920e3d85ab52609be9822ad0da95de656b8acd9a8f0e3a3717895000000056e3636e80000000001fffce0fffffff800000000698eee2400000000698eee2400000005666a6a880000000001f2c3af0d83ebe8fe1dcac7ee8e6c5e460a53c8f8e2487f73dca706d17dd465dc1a9dac38d3e9cf029012f4fb376dca56205cc63327934fc34500cd037d587d59d41a2bee76bdea4011ccd13e4c8dc326d1f7ae8b486bbbafc7702f282f22f203351b782caf1c37ba5edc536ca3ff8ba6d32309cccf0b90ababf133550121dfcc9830be84d7dcbdb0795755966bbbec5fae7082499a2ffdefcde34e518f865a3fb0d061b070fe29ea6f49fc264fe703b2d2eb34b94afcfb22c14504d350595537a991d0d9eea1bdf0de7e078c45fb8760cc02e77fce63f234c29e4fb8448c1076f317310bffd3c3a5f914f33cd61afa9ec62fee4f1b4016396a68a7b5ad81db3f4683d49be690db9d"
]
},
"parsed": [
{
"id": "f9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b",
"price": {
"price": "6670916776347",
"conf": "1467776346",
"expo": -8,
"publish_time": 1770974756
},
"ema_price": {
"price": "6644773600000",
"conf": "2003016440",
"expo": -8,
"publish_time": 1770974756
},
"metadata": {
"slot": 271703147,
"proof_available_time": 1770974758,
"prev_publish_time": 1770974756
}
},
{
"id": "ca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a6",
"price": {
"price": "195794000001",
"conf": "84999998",
"expo": -8,
"publish_time": 1770974756
},
"ema_price": {
"price": "194790397000",
"conf": "76719342",
"expo": -8,
"publish_time": 1770974756
},
"metadata": {
"slot": 271703147,
"proof_available_time": 1770974758,
"prev_publish_time": 1770974756
}
},
{
"id": "683832447e2920e3d85ab52609be9822ad0da95de656b8acd9a8f0e3a3717895",
"price": {
"price": "23323883240",
"conf": "33553632",
"expo": -8,
"publish_time": 1770974756
},
"ema_price": {
"price": "23193086600",
"conf": "32687023",
"expo": -8,
"publish_time": 1770974756
},
"metadata": {
"slot": 271703147,
"proof_available_time": 1770974758,
"prev_publish_time": 1770974756
}
}
]
}
#+end_example
NowNodes API
Now Nodes API interaction
* NowNodes API Playground
** Fetch specific transaction
#+begin_src http :pretty :var TOKEN=(getenv "NOW_NODES_API_TOKEN")
GET https://btcbook.nownodes.io/api/v2/tx/fd2fe3213c6e64c29efe72f7ffdd38d2f9a8a16378b04d876d171b1a0ea21549
Content-Type: application/json
api-key: ${TOKEN}
#+end_src
#+RESULTS:
#+begin_example
{
"txid": "fd2fe3213c6e64c29efe72f7ffdd38d2f9a8a16378b04d876d171b1a0ea21549",
"version": 1,
"vin": [
{
"txid": "ecb7db084ccbe20faee6926cd0874f99306404110f3be660c89eb7b77250fe6f",
"vout": 36,
"sequence": 4294967295,
"n": 0,
"addresses": [
"bc1qlvg8n78sge63j3nrnyh7ccmdxdwmuef3jjmsyd"
],
"isAddress": true,
"value": "1351000"
}
],
"vout": [
{
"value": "54570",
"n": 0,
"hex": "0014dbb5083ae636e971b043ac2436b4bca43469c4aa",
"addresses": [
"bc1qmw6sswhxxm5hrvzr4sjrdd9u5s6xn392s8l5hk"
],
"isAddress": true
},
{
"value": "1296148",
"n": 1,
"hex": "0014715b1ec29a378c6764611b96b76dbb7f184392e6",
"addresses": [
"bc1qw9d3as56x7xxwerprwttwmdm0uvy8yhx2gueup"
],
"isAddress": true
}
],
"blockHash": "0000000000000000000141a1ebcd300411009c8ae6455b9ebec4ab27396ac1cd",
"blockHeight": 940344,
"confirmations": 3,
"blockTime": 1773286609,
"size": 222,
"vsize": 141,
"value": "1350718",
"valueIn": "1351000",
"fees": "282",
"hex": "010000000001016ffe5072b7b79ec860e63b0f11046430994f87d06c92e6ae0fe2cb4c08dbb7ec2400000000ffffffff022ad5000000000000160014dbb5083ae636e971b043ac2436b4bca43469c4aa14c7130000000000160014715b1ec29a378c6764611b96b76dbb7f184392e602473044022015918136d286eed591c0510be24880fc1b84ad66fc16afcb09fb6eb95907441502202ad299941bf81d6798f39ef6197e8737be2178389ff54c7a4bab1d53b45d0d3c01210394f20bc6120541a759ea16cd1b62dcd1a28e92ca0e6296c57328ef3b866c9f4300000000"
}
#+end_example
** Unconfirmed transaction
#+begin_src http :pretty :var TOKEN=(getenv "NOW_NODES_API_TOKEN")
GET https://btcbook.nownodes.io/api/v2/tx/fd2fe3213c6e64c29efe72f7ffdd38d2f9a8a16378b04d876d171b1a0ea21549
Content-Type: application/json
api-key: ${TOKEN}
#+end_src
#+RESULTS:
#+begin_example
{
"txid": "fd2fe3213c6e64c29efe72f7ffdd38d2f9a8a16378b04d876d171b1a0ea21549",
"version": 1,
"vin": [
{
"txid": "ecb7db084ccbe20faee6926cd0874f99306404110f3be660c89eb7b77250fe6f",
"vout": 36,
"sequence": 4294967295,
"n": 0,
"addresses": [
"bc1qlvg8n78sge63j3nrnyh7ccmdxdwmuef3jjmsyd"
],
"isAddress": true,
"value": "1351000"
}
],
"vout": [
{
"value": "54570",
"n": 0,
"hex": "0014dbb5083ae636e971b043ac2436b4bca43469c4aa",
"addresses": [
"bc1qmw6sswhxxm5hrvzr4sjrdd9u5s6xn392s8l5hk"
],
"isAddress": true
},
{
"value": "1296148",
"n": 1,
"hex": "0014715b1ec29a378c6764611b96b76dbb7f184392e6",
"addresses": [
"bc1qw9d3as56x7xxwerprwttwmdm0uvy8yhx2gueup"
],
"isAddress": true
}
],
"blockHeight": -1,
"confirmations": 0,
"confirmationETABlocks": 3,
"confirmationETASeconds": 2142,
"blockTime": 1773286072,
"size": 222,
"vsize": 141,
"value": "1350718",
"valueIn": "1351000",
"fees": "282",
"hex": "010000000001016ffe5072b7b79ec860e63b0f11046430994f87d06c92e6ae0fe2cb4c08dbb7ec2400000000ffffffff022ad5000000000000160014dbb5083ae636e971b043ac2436b4bca43469c4aa14c7130000000000160014715b1ec29a378c6764611b96b76dbb7f184392e602473044022015918136d286eed591c0510be24880fc1b84ad66fc16afcb09fb6eb95907441502202ad299941bf81d6798f39ef6197e8737be2178389ff54c7a4bab1d53b45d0d3c01210394f20bc6120541a759ea16cd1b62dcd1a28e92ca0e6296c57328ef3b866c9f4300000000",
"coinSpecificData": {
"txid": "fd2fe3213c6e64c29efe72f7ffdd38d2f9a8a16378b04d876d171b1a0ea21549",
"hash": "2c902fba53d936769a74106d521eb8f92154fcb72d51a44fb1f626f645621ce3",
"version": 1,
"size": 222,
"vsize": 141,
"weight": 561,
"locktime": 0,
"vin": [
{
"txid": "ecb7db084ccbe20faee6926cd0874f99306404110f3be660c89eb7b77250fe6f",
"vout": 36,
"scriptSig": {
"asm": "",
"hex": ""
},
"txinwitness": [
"3044022015918136d286eed591c0510be24880fc1b84ad66fc16afcb09fb6eb95907441502202ad299941bf81d6798f39ef6197e8737be2178389ff54c7a4bab1d53b45d0d3c01",
"0394f20bc6120541a759ea16cd1b62dcd1a28e92ca0e6296c57328ef3b866c9f43"
],
"sequence": 4294967295
}
],
"vout": [
{
"value": 0.00054570,
"n": 0,
"scriptPubKey": {
"asm": "0 dbb5083ae636e971b043ac2436b4bca43469c4aa",
"desc": "addr(bc1qmw6sswhxxm5hrvzr4sjrdd9u5s6xn392s8l5hk)#k7mgw0zy",
"hex": "0014dbb5083ae636e971b043ac2436b4bca43469c4aa",
"address": "bc1qmw6sswhxxm5hrvzr4sjrdd9u5s6xn392s8l5hk",
"type": "witness_v0_keyhash"
}
},
{
"value": 0.01296148,
"n": 1,
"scriptPubKey": {
"asm": "0 715b1ec29a378c6764611b96b76dbb7f184392e6",
"desc": "addr(bc1qw9d3as56x7xxwerprwttwmdm0uvy8yhx2gueup)#qu2d0eka",
"hex": "0014715b1ec29a378c6764611b96b76dbb7f184392e6",
"address": "bc1qw9d3as56x7xxwerprwttwmdm0uvy8yhx2gueup",
"type": "witness_v0_keyhash"
}
}
],
"hex": "010000000001016ffe5072b7b79ec860e63b0f11046430994f87d06c92e6ae0fe2cb4c08dbb7ec2400000000ffffffff022ad5000000000000160014dbb5083ae636e971b043ac2436b4bca43469c4aa14c7130000000000160014715b1ec29a378c6764611b96b76dbb7f184392e602473044022015918136d286eed591c0510be24880fc1b84ad66fc16afcb09fb6eb95907441502202ad299941bf81d6798f39ef6197e8737be2178389ff54c7a4bab1d53b45d0d3c01210394f20bc6120541a759ea16cd1b62dcd1a28e92ca0e6296c57328ef3b866c9f4300000000"
}
}
#+end_example
** Get address detail
#+begin_src http :pretty :var TOKEN=(getenv "NOW_NODES_API_TOKEN")
GET https://btcbook.nownodes.io/api/v2/address/167ZWTT8n6s4ya8cGjqNNQjDwDGY31vmHg
Content-Type: application/json
api-key: ${TOKEN}
Accept: */*
#+end_src
#+RESULTS:
#+begin_example
{
"page": 1,
"totalPages": 1,
"itemsOnPage": 1000,
"address": "167ZWTT8n6s4ya8cGjqNNQjDwDGY31vmHg",
"balance": "899900658730",
"totalReceived": "899900658730",
"totalSent": "0",
"unconfirmedBalance": "0",
"unconfirmedTxs": 0,
"txs": 78,
"txids": [
"f5f5ce8de727788299d9d00e45dc11f93aa7cb3b23681ce642cedce8049b8109",
"cfb44c765cff43208a5e871625e477234ed689be1d3b2fdedd495af236cf8eb3",
"56e7464ee31fec5db75fe31f05d4072d354f77c7a1605313c3d9fa07807652ed",
]
}
#+end_example