Working with HyperCore
This guide provides a comprehensive overview for developers on how to use the Across Swap API to bridge USDT-SPOT to/from HyperCore, integrated via HyperEVM. We will be focusing on how using the Swap API abstracts away all complexities to ensure a smooth developer and user experience.
Important Parameters for the Swap API Call
To bridge USDT-SPOT to/from HyperCore, you make a standard call to the /swap/approval endpoint. The key is to specify HyperCore destinationChainId: 1337  and USDT-SPOT outputToken: 0x200000000000000000000000000000000000010C in the destination parameters. 
While using the GET /swap/chains endpoint, you will see HyperCore listed with chainId: 1337 .
Next up, we will look at 2 major use cases of the  /swap/approval call while working with HyperCore.
You must initialize your depositor account on HyperCore by transferring at least 1 USDT0 to your account before conducting a crosschain swap with this account as the recipient. Check your balance at hyperliquid.xyz/portfolio
If the depositor account is not initialized on HyperCore, the Swap API will throw the following error:
{
  "type": "AcrossApiError",
  "code": "INVALID_PARAM",
  "status": 400,
  "message": "HyperEVM -\u003E HyperCore: Depositor is not initialized on HyperCore",
  "id": "jtmct-1760080200505-ce1bd0d88e2f"
}From any EVM chain (like Arbitrum) to HyperCore
https://app.across.to/api/swap/approval?
tradeType=exactInput&
inputToken=0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9&
originChainId=42161& // arbitrum
outputToken=0x200000000000000000000000000000000000010C& // USDT-SPOT
destinationChainId=1337& // HyperCore
depositor=0x9A8f92a830A5cB89a3816e3D267CB7791c16b04D&
amount=1000000This is a standard crosschain swap that settles on HyperEVM before being credited to HyperCore:
Deposit on Origin: The user's transaction calls the SpokePool on the origin chain, emitting a
FundsDepositedevent.Fill on HyperEVM: An Across relayer fills the deposit, which emits a
FilledRelayevent.Automatic Deposit to HyperCore: The Across API automatically appends a destination action to the relay. This action calls a specialized function on HyperEVM which, in turn, credits the user's USDT-SPOT balance on HyperCore. You do not need to specify this action in your API call.
From HyperEVM to HyperCore
https://app.across.to/api/swap/approval?
tradeType=exactInput&
inputToken=0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb&
originChainId=999& // HyperEVM
outputToken=0x200000000000000000000000000000000000010C& // USDT-SPOT
destinationChainId=1337& // HyperCore
depositor=0x9A8f92a830A5cB89a3816e3D267CB7791c16b04D&
amount=1000000This flow is a direct deposit rather than a traditional crosschain swap:
Direct Deposit: The user deposits on HyperEVM with an attached transfer function for HyperCore. You do not need to specify this action in your API call.
Credit on HyperCore: This function immediately executes the logic to credit the user's USDT-SPOT balance on HyperCore. This is a single, synchronous transaction with no
FundsDepositedorFilledRelayevents.
Read the API Reference and in case you face any errors or need support, please feel free to reach out to us.
Last updated