Invisible Infrastructure Issue 01 | Co-create with global developers and fully analyze the OKX Web3 wallet API
Driven by its innovative gene, the OKX Web3 wallet is improving both internally and externally: it continuously optimizes its products internally and widely explores co-creation externally.
OKX Web3 Wallet has been widely exploring co-creation, 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, which not only promotes technological innovation and perkembangan 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, the OKX Web3 wallet has lowered the development threshold and established extensive links through open source code and open API, thereby achieving linkage, joint learning, progress and creation with global developers, thereby promoting the construction of crypto industry infrastructure.
Functions like APIs that are not easily perceived or visible to everyday users when using products are like the invisible infrastructure of the OKX Web3 wallet. Although 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 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.
OKX Web3 Wallet API Framework
API, short for Application Programming Interface, is a set of definitions and protocols used to build and integrate 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 industrys 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 servEss, 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 API documentation . Interested developers can click to view it at any time and use it according to the steps.
OKX Web3 wallet now supports more than 100 public chains and provides a unified user experience across three terminals: App, plug-in and web page. It covers five major sections: wallet, DEX aggregator, DeFi, NFT market 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.
Wallet API
As the core of the entire product, the wallet 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 the ability to count assets in millions of addresses; 2) Multiple scenarios, easy access to 60+ networks, support for heterogeneous multi-chain ecosystems 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 capabilities and solutions for MPC wallets and AA smart wallet accounts. Through powerful wallet services, developers Web3 wallet development needs can be fully met, and the Web3 wallet entry process can be simplified.
Specifically, the wallet API covers multiple core modules to meet the basic asset management and transaction needs of users. For example: address and wallet generation, on-chain asset and currency price information query, transaction management, and other common data queries such as currency information, Gas price and address authorization information. Among them, the transaction management module provides a wide range of services such as building, signing, broadcasting, tracking transactions, querying transaction history, supporting transactions on account model networks such as EVM, and supporting transactions on UTXO model networks such as BTC. In general, developers can use the wallet API to perform account management, asset management, transaction management, common information query, and Webhook (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 and observe account addresses, update wallet accounts, update observed accounts, delete accounts, query the list of created accounts, query addresses under accounts, and more.
Second, in terms of asset management. This includes adding subscribed 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 additions or management are not possible, and only the asset balances of currencies that are supported by the current wallet API can be obtained.
Developers can use the asset management API to 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, and more.
Third, in terms of transaction management. This includes how to send transactions and query transaction records. Developers can use the transaction management API to obtain the data required for signatures, Gas price, Gas limit, Nonce, etc., and perform address verification, query transaction details by transaction hash, query transaction details by order ID, query transaction list by account, query transaction list by address, etc.
Fourth, in other aspects, developers can also query chain-related information such as UTXO and currency information through APIs; or subscribe to relevant data of block events and transaction events through Webhooks, and can create up to 20 subscriptions in batches each time.
DEX Aggregator API
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. It also has DEX market section, limit order, KYT security detection and other functions.
Its core mainly includes single-chain Swap and Bridge. Both single-chain Swap and Bridge require on-chain data analysis 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 through Bridge in one step, 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 documentation to build the required Web3 transaction services and applications, such as Web3 wallets, DApp projects, DeFi projects and other application scenarios.
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. Currently, OKX DEX Aggregator API mainly covers: exchange API, cross-chain API, limit order API, which is convenient, easy to understand and safe to access and use.
First, in terms of exchange functions, the OKX DEX aggregator aggregates liquidity sources from decentralized exchanges such as Uniswap, Curve, and Balancer, and can split a single transaction to multiple DEXs, providing users with better prices through efficient routing. The OKX DEX aggregator will automatically find a liquidity pool with better liquidity depth on the chain, comprehensively calculate the price, slippage, and transaction costs, and through the intelligent order splitting algorithm, based on a comprehensive comparison of DEX and PMM quotes, select the three dimensions of better quotes for users: greater liquidity, lower slippage, and better prices.
Developers can use the exchange API to obtain the chains, currency lists, liquidity lists, transaction authorizations, exchange prices, transaction data, etc. supported by the OKX DEX aggregator. 聽
Second, in terms of cross-chain functions, the 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 source chain exchange first, then cross-chain bridge transactions, and then exchange for the tokens that users want on the target chain. The super-optimal algorithm X Routing independently developed by the OKX DEX aggregator 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 smart 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 the OKX DEX aggregator supports cross-chain exchange. 聽
Third, in terms of the limit function, the OKX DEX aggregator limit order is a business process in which a user buys or sells tokens on 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 before limit orders can be executed, there is no slippage for limit order creators, and partial order execution is supported. Developers can use the limit order API to obtain the chain list, transaction authorization, currency list supported by the OKX DEX aggregator, create limit orders, query limit orders, etc.
Marketplace API
OKX Marketplace covers the EVM NFT market, Runes market, Ordinals market and issuance market, and supports a total of 26 mainstream popular public chains including Bitcoin and Ethereum.
First, the EVM NFT market. The OKX NFT market is a one-stop decentralized NFT aggregation trading platform that 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 users and developers with real-time on-chain data, 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 can provide 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; the transaction aspect: supports 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, the OKX Runes Market. The OKX Runes Market is the industrys first platform to provide rune trading on the APP side, supporting users to perform Runes asset batch purchases, etching and other functions with zero platform fees. In the future, the 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, and more.
Third, the OKX Web3 wallet Ordinals market is the largest BRC 20 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 inscription of BRC-20 and BTC NFT.
Developers can use the Ordinals Market API to create Ordinals orders, obtain a list of inscription assets, submit orders, obtain a list of Ordinals collections, orders, transaction history, and related models, and more.
DeFi API
OKX Web3 DeFi is the markets leading one-stop DeFi trading aggregation platform, allowing 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.
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, etc. Developers integrate 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 the protocol list, token list, product list, product details, network list, etc. Second, in terms of calculation, it supports querying the estimated calculation information of subscription and querying the estimated calculation information of redemption. 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 users position list, querying the users balance list, and querying the users redemption application list.
Innovation-based, working with global developers
In todays 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 open source code 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 constant pursuit of innovation. Through API construction, the OKX Web3 Wallet provides a powerful and flexible platform for global developers, 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, 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 will also promote the prosperity of its own platform.
In short, OKX Web3s construction on API has demonstrated a higher level of vision, what we do now is for the future.
Disclaimer
This article is for reference only. This article only represents the authors views and does not represent the position of OKX. This article is not intended to provide (i) investment advice or investment recommendations; (ii) an offer or solicitation 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. Holding digital assets (including stablecoins and NFTs) involves 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.
This article is sourced from the internet: Invisible Infrastructure Issue 01 | Co-create with global developers and fully analyze the OKX Web3 wallet API
Related: Airdrops are not dead, but don’t chase hot projects too much
Original article by Axel Bitblaze Original translation: TechFlow With all the major airdrops like $ZRO and $ZK now complete, the sentiment around airdrops seems to have cooled down a bit. So, is the airdrop beta over? Are they still worth farming? What’s next for airdrops? I’ll share my thoughts in this post. What’s next for the airdrop? A few months ago I wrote an article about “Current Airdrop Betas” where I mentioned that there were three major airdrop projects that had yet to be launched. Now that they have all been completed, here are my thoughts on the upcoming betas. ( See tweet for details) Are airdrops dead? The short answer is no. The longer answer is that airdrops vary. It can be understood that in games, there will always…