Invisible Infrastructure Issue 01|Co-create with global developers and fully analyze the OKX Web3 wallet API

Driven by the gene of innovation, OKX Web3 Wallet has been improving both internally and externally: continuously optimizing products internally and exploring co-creation externally.
In terms of extensive exploration of co-creation, OKX Web3 Wallet has been leading the open source of code on the one hand, and increasingly strengthening the construction of APIs on the other. This move is of great significance in the blockchain technology ecosystem. It not only promotes technological innovation and development efficiency, but also enhances the transparency, interoperability and security of the system, promotes the construction of the Web3 community and ecosystem, increases user experience, and promotes industry standardization.
In addition, OKX Web3 Wallet has lowered the development threshold and established extensive links through open source code and open APIs, thereby achieving linkage, common learning, progress and creation with global developers, thereby promoting the construction of infrastructure in the crypto industry.
Functions like APIs that are not easily perceived or not very obvious to daily users when using products are like the "invisible infrastructure" of OKX Web3 Wallet. Although they are important, they are rarely known to a wide range of users. Since there is no introduction to the OKX Web3 wallet API on the market, this article will focus on the API level. By comprehensively analyzing the OKX Web3 API functions, we hope to attract and help more developers to realize their ideas and implement innovations. This is the first issue of the OKX Web3 invisible infrastructure, and the first issue of the OKX Web3 API series. The second issue will explore the story behind the OKX Web3 team building the API through dialogue.
API, the full name of which is Application Programming Interface, is a set of definitions and protocols for building and integrating application software. API allows communication and data exchange between different software systems. Through API, developers can take advantage of existing functions and data without having to write code from scratch. API can significantly improve development efficiency, promote system interoperability, and drive technological innovation.
As the industry's leading one-stop Web3 portal, OKX Web3 provides a complete set of Web3 development solutions - OnchainOS. As a multi-chain Web3 development engine, OnchainOS has achieved standardization in the access of chains and services, greatly reducing the development cycle and investment costs. It includes major modules such as wallets, DEX aggregators, Marketplace, DeFi, and everything from transaction liquidity to on-chain data solutions. If developers want to build their own Web3 services, using OnchainOS will be a more efficient and economical choice.
In order to better serve developers, greatly reduce the development threshold and improve efficiency, OKX Web3 provides a very comprehensive, detailed, and graphic-basedAPI documentation. Interested developers can click to view it at any time and follow the steps to use it.
OKX Web3 wallet now supports more than 100 public chains, and provides a unified user experience of App, plug-ins and web pages, covering five major sections including wallets, DEX aggregators, DeFi, NFT markets and DApp exploration. It has also launched the Bitcoin inscription and rune trading market, and is committed to providing users with comprehensive Web3 services.
Next, the article will take wallets, DEX aggregators, Marketplace, and DeFi sections as examples to introduce some API-related content.
As the core of the entire product, the wallet section API provides the underlying technical solution for non-custodial wallets, which can help developers easily build on-chain services and applications. For example, Web3 multi-chain wallets, DApp built-in wallets, multi-chain Web3 applications, exchange wallet services, etc.
Wallet API has the following three core functions in the wallet service: 1) Multi-chain address aggregation, providing million-level address asset statistics capabilities; 2) Multi-scenario, easy access to 60+ networks, support for heterogeneous multi-chain ecology and various BTC asset protocols; 3) High availability and high stability. Implement interface and system monitoring to ensure smooth access.
Developers can use the wallet API to efficiently and securely build wallets in just 3 steps, and easily access 60+ networks, including popular EVM, Solana, TRON, BTC, etc., and also support cutting-edge ecosystems such as inscriptions. Subsequent wallet APIs will gradually provide the capabilities and solutions of MPC wallets and AA smart wallet accounts. Through powerful wallet services, it can fully meet the developer's Web3 wallet development needs and simplify the Web3 wallet entry process.
Specifically, the wallet API covers multiple core modules to meet users' basic asset management and transaction needs. For example: address and wallet generation, on-chain asset and currency price information query, transaction management, and other commonly used data queries such as currency information, Gas price and address authorization information. Among them, the transaction management module provides a very rich service of building, signing, broadcasting, tracking transactions, querying transaction history, supporting transactions of account model networks such as EVM, and supporting transactions of UTXO model networks such as BTC. In general, developers can use the wallet API to manage accounts, assets, transactions, common information queries, and Webhooks (real-time subscription to on-chain data), etc.
First, in terms of account management. Different from the general single-address query mode, the wallet API provides a structured subscription query for multiple addresses. Developers can associate multiple addresses with one account and efficiently query asset status and transaction history in multi-chain scenarios. The wallet API provides two account types: wallet account and observation account. Among them, 1) the wallet account needs to provide a message signature for authentication, can freely add custom tokens, and can send transactions. 2) The observation account does not need to provide a message signature, and by default displays all tokens included in the OKX platform, and cannot send transactions
Developers can use the account management API to create wallet accounts and manage addresses under wallet accounts, aggregate observation account addresses, update wallet accounts, update observation accounts, delete accounts, query the list of created accounts, query addresses under accounts, etc.
Second, in terms of asset management. Includes adding subscription currencies to accounts, obtaining the corresponding asset balance, viewing total assets, and deleting assets that are no longer of interest. It is worth noting that for wallet accounts, developers can add and manage custom currencies. For observation accounts, custom addition or management is not possible, and only the asset balance of the currency supported by the current wallet API can be obtained.
Developers can add currencies, obtain wallet account token balances, obtain observation account token balances, obtain specified currency balances, obtain total currency assets, delete currencies, query currency lists, etc. through the asset management API.
Third, in terms of transaction management. Including how to send transactions and query transaction records. Developers can obtain the data required for signatures, Gas price, Gas limit, Nonce, etc. through the transaction management API, and perform address verification, query transaction details according to transaction hash, query transaction details according to order ID, query transaction list according to account, query transaction list according to address, etc.
Fourth, in other aspects. Developers can also query chain-related information such as UTXO and currency information through API; or subscribe to relevant data of block events and transaction events through Webhook, and can create up to 20 subscriptions in batches each time.
OKX DEX Aggregator is a one-stop multi-chain, DEX and cross-chain aggregator. It has aggregated 25+ cross-chains, 40+ public chains, more than 400 DEXs, etc. Through X Routing intelligent routing, one transaction can use multiple DEXs at the same time, providing users with better prices, better liquidity and 0 transaction service fees, and also has DEX market section, limit orders, KYT security detection and other functions.
Its core mainly includes single-chain Swap and Bridge, both of which require on-chain data parsing to complete the entire transaction process. Single-chain Swap and Bridge are combined into different transaction modes according to the exchanged currency pairs. For example, transactions can be completed through source chain Swap + Bridge, or transactions can be completed in one step through Bridge, and cross-chain transactions can be completed in the form of source chain Swap + Bridge + target chain Swap. Among them, the XBridge contract developed by the OKX DEX aggregator is the core of the entire transaction. It supports cross-chain between mainstream EVM chains, cross-chain between heterogeneous chains, and cross-chain between EVM chains and heterogeneous chains.
Developers or professional users can use the DEX aggregator API document to build the required Web3 transaction services and applications, such as Web3 wallets, DApp projects, DeFi projects and other application scenarios.
The OKX DEX Aggregator API has core highlights such as multi-chain support, multiple cross-chain bridges and multiple DEX support, as well as stability and high availability. Its response time is within 100 milliseconds, and it can provide a better inquiry path for free. At present, the OKX DEX Aggregator API mainly covers: exchange API, cross-chain API, limit order API, which are convenient, easy to understand and safe to access and use.
First, in terms of exchange function,OKX DEX Aggregator aggregates the liquidity sources of various decentralized exchanges such as Uniswap, Curve, Balancer, etc., and can split a single transaction to multiple DEXs, providing users with better prices through efficient routing. OKX DEX aggregator will automatically find the liquidity pool with better liquidity depth on the chain, comprehensively calculate the price, slippage and transaction cost, and through the intelligent order splitting algorithm, based on the comprehensive comparison of DEX and PMM quotes, select the three dimensions of better quotes for users: greater liquidity, lower slippage, and better price.
Developers can obtain the chains, currency lists, liquidity lists, transaction authorizations, exchange prices, transaction data, etc. supported by the OKX DEX aggregator through the exchange API.
Second, in terms of cross-chain functions,OKX DEX aggregator aggregates high-quality cross-chain bridges currently on the market, such as circle CCTP, Stargate, Across, Wormhole, SWFT, etc., to provide users with multiple cross-chain path options, which can realize the source chain exchange first and then the cross-chain bridge transaction, and then exchange for the tokens that users want on the target chain. OKX DEX aggregator independently developed super-optimal algorithm X Routing can automatically find a deeper liquidity pool on the chain when trading on the source chain, comprehensively calculate the price, slippage and transaction cost, and obtain a better exchange quantity through the intelligent order splitting algorithm. After that, it will compare prices on multiple high-quality cross-chain bridges, and obtain a better cross-chain quotation after comprehensively calculating the cross-out quantity, cross-chain bridge fees, slippage and transaction costs.
Developers can use the cross-chain API to obtain the chains, currency lists, bridge information, path information, transaction authorization, transaction data, query transaction status, etc. that OKX DEX aggregator supports cross-chain exchange.
Third, in terms of limit function,OKX DEX aggregator limit order (Limit Order) is a business process in which a user buys or sells tokens in a decentralized exchange at a specified target price. If the current market price can meet the target price specified by the user, the DEX aggregator will automatically complete the transaction. Through the DEX limit order API, users can create and query limit orders through the interface and aggregate liquidity into the DEX aggregator to enjoy better prices.
The OKX DEX aggregator limit order API has the characteristics of waiting for DEX aggregator users to take orders, no slippage for limit order creators, and support for partial order transactions. Developers can use the limit order API to obtain the chain list, transaction authorization, currency list, create limit orders, query limit orders, etc. supported by the OKX DEX aggregator.
OKX Marketplace covers the EVM NFT market, Runes market, Ordinals market and issuance market, and supports a total of 26 mainstream popular public chains such as Bitcoin and Ethereum.
First, the EVM NFT market. OKX NFT Market is a one-stop decentralized NFT aggregation trading platform. It has aggregated Opensea, Magic Eden, Looksrare and other platforms, supporting NFT holders to list their NFT works on multiple markets at the same time and obtain higher liquidity at lower transaction costs. In addition, it also supports multi-chain NFT creation and cross-platform transactions, can provide real-time on-chain data for users and developers, and is committed to building a decentralized, multi-chain NFT ecosystem. At present, the OKX NFT market brings together the order depth of multiple mainstream markets and platforms, and includes a large amount of NFT collection data, which can provide developers and users with timely order data and real-time and accurate on-chain data.
OKX NFT API provides most of the functions of data query and transaction. The data aspect includes NFT and collection information query, transaction data query; in terms of transaction: support one-click order placement to multiple markets, and batch purchase of lower-priced orders in multiple markets at the same time. Developers can use the NFT Market API to obtain NFT details and lists, collection details and lists, accessed networks and markets, query pending orders, bid orders, purchase orders, etc.
Second, OKX Runes Market. OKX Runes Market is the industry's first platform to provide rune trading on the APP side, supporting users to perform Runes asset batch sweeping, etching and other functions without platform fees. In the future, OKX Runes Market will continue to optimize and add more new features based on user feedback.
Developers can use the OKX Runes Market API to obtain collection information, popular collections, transaction history, wallet assets, order information, submit pending orders, etc.
Third, OKX Web3 Wallet Ordinals Market is the largest BRC20 inscription and BTC NFT trading market. The OKX Ordinals Market is completely decentralized, with no platform service fee for interaction, and supports multiple functions such as one-stop transfer, trading, and engraving of BRC-20 and BTC NFT.
Developers can use the Ordinals Market API to create Ordinals orders, obtain inscription asset lists, submit orders, obtain Ordinals collection lists, orders, transaction history and related models, etc.
OKX Web3 DeFi is the leading one-stop DeFi trading aggregation platform in the market, making it easy for users to quickly and accurately find educational products that meet their needs. OKX Web3 DeFi currently has access to more than 80 protocols, including Aave, Compound, Curve, Yearn and Uniswap, and supports more than 15 networks, such as Arbitrum, Ethereum and Polygon.
The OKX Web3 DeFi API describes in detail the data interaction process of the user transaction process, including the subscription process, redemption process, and reward collection process. Developers integrate the OKX Web3 DeFi Open API into their applications, allowing users to easily and quickly access all DeFi protocols and enjoy the fun of earning coins in the process of trading DeFi.
Specifically, developers can implement a variety of functions through the OKX Web3 DeFi API. First, in terms of querying information, it supports developers to query protocol lists, token lists, product lists, product details, network lists, etc. Second, in terms of calculations, it supports querying estimated calculation information for subscriptions and querying estimated calculation information for redemptions. Third, in terms of transactions, it supports generating call data for pre-transaction authorization, generating call data for subscription transactions, generating call data for redemption transactions, and generating call data for receiving bonus transactions. Fourth, at the user level, it supports querying the user's position list, querying the user's balance list, and querying the user's redemption application list.
In today's rapidly developing blockchain and cryptocurrency fields, open source and open APIs have become an important driving force for technological innovation and industry development. By promoting code open source and open APIs, OKX Web3 Wallet not only provides global developers with stable and reliable technical support, rich resources and convenient tools, but also promotes transparency, interoperability and community cooperation in the entire industry.
Among them, the design and implementation of the OKX Web3 Wallet API is based on a deep understanding and continuous pursuit of innovation. Through API construction, OKX Web3 Wallet provides global developers with a powerful and flexible platform, a standardized interface for accessing and utilizing its platform functions, allowing developers to innovate on the existing basis and quickly develop and deploy new decentralized applications (DApps). For example, developers can use API interfaces to build innovative DeFi protocols, decentralized exchanges DEX and other blockchain applications. Allowing them to give full play to their creativity and technical strength in the field of blockchain and cryptocurrency, come up with new ideas and solutions, and jointly push the boundaries of technology.
At the same time, the open API allows developers and users to clearly understand and use the various functions of the OKX Web3 wallet. This transparency helps to enhance users' trust in the platform and promote the popularity and use of the platform. For example, developers can understand the specific functions and usage methods of each interface through the API documentation, so as to better utilize these resources for development. By opening the API, the OKX Web3 wallet shows its open and transparent attitude to the community. This attitude not only enhances the credibility of the platform, but also attracts more developers and users to participate in the ecosystem, enriches the application scenarios of the entire ecosystem, and jointly promotes the development of the platform.
In the long run, by attracting more developers and projects to join, the OKX Web3 wallet will be able to deeply integrate with other blockchain platforms and service providers to form an interconnected blockchain ecosystem, which will not only promote the technological progress and application expansion of the entire blockchain industry, but also lay a solid foundation for building a more open and collaborative ecosystem. It also promotes the prosperity of its own platform.
In short, OKX Web3's construction on API has shown a higher pattern, "What we do now is for the future."
Disclaimer
This article is for reference only. This article only represents the author's views and does not represent the position of OKX. This article is not intended to provide (i) investment advice or investment recommendations; (ii) offers or solicitations to buy, sell or hold digital assets; (iii) financial, accounting, legal or tax advice. We do not guarantee the accuracy, completeness or usefulness of such information. Digital assets held (including stablecoins and NFTs) involve high risks and may fluctuate significantly. You should carefully consider whether trading or holding digital assets is suitable for you based on your financial situation. Please consult your legal/tax/investment professionals for your specific situation. Please be responsible for understanding and complying with local applicable laws and regulations.
Recommended
The Wall Street Journal: How is AI Trading Stealing the Limelight from Cryptocurrency?
Aug 15, 14:00
Tencent Still Has a Dream
Aug 15, 11:27
To Catch North Korean Hackers, They Set Up a Fake Project
Aug 15, 10:00
From Litigation to Settlement: Positive Signal Released by HTX's Negotiation with FCA
Aug 14, 19:32
11,742 Shipping Addresses Exposed Alongside Trezor Orders
Aug 14, 19:01
Founder Interview: FOMO Creator Explains How They Added 30,000 Users in One Day and Became One of the Fastest-Growing Crypto Apps
Aug 14, 18:37