Skip to main content
The GET shortcuts/route/nontokenized endpoint constructs an optimal conversion route. This API allows entering a non-tokenized DeFi position from any ERC20 or native token.

Authentication

  1. Create an API key using Enso Dashboard.
  2. Securely store your API key and make it available in your environment:
authentication.sh
ENSO_API_KEY="$ENSO_API_KEY"
echo $ENSO_API_KEY >> .env
git ignore .env
source .env

API Parameters

Required Parameters

ParameterTypeDescriptionExample
chainIdnumberChain ID of the network to execute the transaction on999
fromAddressstringThe address making the request0xd8da6bf26964af9d7eed9e03e53415d37aa96045
tokenInstringEthereum address of the token to swap from. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
positionOutstringEthereum address of the position to receive0x200000000000000000000000000000000000010C
amountInstringAmount of tokenIn to swap in wei100000000000000000000
receiverstringEthereum address of the receiver of the positionOut0xd8da6bf26964af9d7eed9e03e53415d37aa96045

Optional Parameters

ParameterTypeDescriptionDefaultExample
routingStrategystringRouting strategy to use (router, delegate, delegate-legacy)"router""delegate"
slippagestringSlippage in basis points (1/10000)"50" (0.5%)"300" (3%)
referralCodestringReferral code for on-chain event tracking-"0123456789ABCDEF"
destinationChainIdnumberChain ID to bridge to and receive nontokenized position-10
feestringFee in basis points (1/10000) for each amountIn value-100 (1%)
feeReceiverstringEthereum address to receive collected fees (required if fee is provided)-0x220866B1A2219f40e72f5c628B65D54268cA3A9D
spenderstringEthereum address of the spender of the tokenIn-0xd8da6bf26964af9d7eed9e03e53415d37aa96045
refundReceiverstringEthereum address to receive any dust tokens produced during execution-0xd8da6bf26964af9d7eed9e03e53415d37aa96045

Response Schema

The API returns a non-tokenized route with the following fields:
FieldTypeDescription
createdAtnumberBlock number the transaction was created on
gasstringGas estimate for the transaction
amountDepositedstringAmount of value allocated to the position after the transaction completes
priceImpactnumber | nullPrice impact in basis points (1/10000). Returns null if calculation is unavailable
txTransactionThe transaction object with to, data, and other fields
routeHop[]The route the shortcut will use
feeAmountstring[]Array of fee amounts charged
ensoFeeAmountstring[]Array of Enso platform fees charged
userOpUserOperationThe ERC-4337 user operation object (if applicable)

Discovering Non-Tokenized Positions

To find available non-tokenized positions for routing, use the GET /api/v1/nontokenized endpoint to query the registry of supported non-tokenized positions.

Query Parameters

ParameterTypeDescriptionExample
projectstringThe overarching project or platform"hypercore"
protocolSlugstringThe specific standard integration or version"hypercore-spot"
chainIdnumberChain ID of the network999
addressstring[]Ethereum addresses of the positions["0x200000000000000000000000000000000000010C"]
primaryAddressstring[]Ethereum addresses for contract interaction["0x200000000000000000000000000000000000010C"]
pagenumberPagination page number (1000 results per page)1
cursornumberCursor for pagination0

Response Schema

The API returns an array of non-tokenized positions with the following fields:
FieldTypeDescription
chainIdnumberChain ID of the network of the position
protocolstringThe specific standard integration or version
addressstringEthereum address of the non-tokenized position
primaryAddressstringEthereum address for contract interaction
underlyingTokensTokenModel[]Underlying tokens of the position (may be null)

Example Usage

# Get all non-tokenized positions on HyperEVM chain
curl -X GET \
  "https://api.enso.build/api/v1/nontokenized?chainId=999" \
  -H "Authorization: Bearer $ENSO_API_KEY" | jq

# Get specific positions for Hypercore
curl -X GET \
  "https://api.enso.build/api/v1/nontokenized?protocolSlug=hypercore-spot" \
  -H "Authorization: Bearer $ENSO_API_KEY" | jq

# Get positions by specific address/id
curl -X GET \
  "https://api.enso.build/api/v1/nontokenized?address=0x200000000000000000000000000000000000010C" \
  -H "Authorization: Bearer $ENSO_API_KEY" | jq
Use the address field from the discovery endpoint response as the positionOut parameter in the routing endpoint.

Example: Depositing into Hypercore

Here’s an example of how to route funds to deposit into a Hypercore position: Example: Depositing 100 HYPE into a Hypercore USDT
  • Input: 100 HYPE
  • Output: Hypercore USDT position
  • Chain: 999 (HyperEVM)
cURL
curl -X GET \
  'https://api.enso.build/api/v1/shortcuts/route/nontokenized?chainId=999&fromAddress=0xd8da6bf26964af9d7eed9e03e53415d37aa96045&tokenIn=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&positionOut=0x200000000000000000000000000000000000010C&amountIn=100000000000000000000&receiver=0xd8da6bf26964af9d7eed9e03e53415d37aa96045' \
  -H "Authorization: Bearer $ENSO_API_KEY" | jq
Key parameters:
  • chainId: 999 (Hypercore chain)
  • tokenIn: 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee (ETH)
  • positionOut: 0x200000000000000000000000000000000000010C (Hypercore USDT position)
  • amountIn: 100000000000000000000 (100 HYPE in wei)
  • receiver: The address that will receive the position

Example: Cross-Chain Bridge to Hypercore

Here’s an example of how to bridge funds from Ethereum to a Hypercore position: Example: Bridging 0.5 ETH from Ethereum to HYPE Hypercore position
  • Input: 0.5 ETH (Ethereum)
  • Output: HYPE Hypercore position
  • Source Chain: 1 (Ethereum)
  • Destination Chain: 999 (HyperEVM)
cURL
curl -X GET \
  'https://api.enso.build/api/v1/shortcuts/route/nontokenized?chainId=1&destinationChainId=999&fromAddress=0xd8da6bf26964af9d7eed9e03e53415d37aa96045&tokenIn=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&positionOut=0x2222222222222222222222222222222222222222&amountIn=500000000000000000&receiver=0xd8da6bf26964af9d7eed9e03e53415d37aa96045' \
  -H "Authorization: Bearer $ENSO_API_KEY" | jq
Key parameters for cross-chain routing:
  • chainId: 1 (Ethereum - source chain)
  • destinationChainId: 999 (HyperEVM - destination chain)
  • tokenIn: 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee (ETH on Ethereum)
  • positionOut: 0x2222222222222222222222222222222222222222 (HYPE position on HyperEVM)
  • amountIn: 500000000000000000 (0.5 ETH in wei)
  • referralCode: 0123456789ABCDEF (optional referral tracking)
  • receiver: The address that will receive the position on the destination chain

Next steps