Swapping Endpoints
- POSTCheck Approval
- POSTQuote
- POSTLimit Quote
- UniswapX Swapping
- Protocol Swapping
Liquidity Provisioning Endpoints
Reference Data Endpoints
Liquidity Provisioning Endpoints
Migrate Position
The response will also have the transaction to migrate the position for the corresponding pool. If the parameter simulateTransaction
is set to true
, then the response will include the gas fees for the migrate transaction.
POST
/
lp
/
migrate
curl --request POST \
--url https://trade-api.gateway.uniswap.org/v1/lp/migrate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"tokenId": 123,
"walletAddress": "<string>",
"chainId": 1,
"inputProtocol": "V2",
"inputPosition": {
"pool": {
"token0": "<string>",
"token1": "<string>",
"fee": 123,
"tickSpacing": 123,
"hooks": "<string>"
},
"tickLower": 123,
"tickUpper": 123
},
"inputPoolLiquidity": "<string>",
"inputCurrentTick": 123,
"inputSqrtRatioX96": "<string>",
"inputPositionLiquidity": "<string>",
"signature": "<string>",
"amount0": "<string>",
"amount1": "<string>",
"outputProtocol": "V2",
"outputPosition": {
"pool": {
"token0": "<string>",
"token1": "<string>",
"fee": 123,
"tickSpacing": 123,
"hooks": "<string>"
},
"tickLower": 123,
"tickUpper": 123
},
"initialPrice": "<string>",
"outputPoolLiquidity": "<string>",
"outputCurrentTick": 123,
"outputSqrtRatioX96": "<string>",
"expectedTokenOwed0RawAmount": "<string>",
"expectedTokenOwed1RawAmount": "<string>",
"slippageTolerance": 123,
"deadline": 123,
"signatureDeadline": 123,
"simulateTransaction": false
}'
{
"requestId": "<string>",
"migrate": {
"to": "<string>",
"from": "<string>",
"data": "<string>",
"value": "<string>",
"gasLimit": "<string>",
"chainId": 1,
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"gasPrice": "<string>"
},
"gasFee": "<string>"
}
Authorizations
Body
application/json
Response
200
application/json
Migrate LP Position successful.
The response is of type object
.
curl --request POST \
--url https://trade-api.gateway.uniswap.org/v1/lp/migrate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"tokenId": 123,
"walletAddress": "<string>",
"chainId": 1,
"inputProtocol": "V2",
"inputPosition": {
"pool": {
"token0": "<string>",
"token1": "<string>",
"fee": 123,
"tickSpacing": 123,
"hooks": "<string>"
},
"tickLower": 123,
"tickUpper": 123
},
"inputPoolLiquidity": "<string>",
"inputCurrentTick": 123,
"inputSqrtRatioX96": "<string>",
"inputPositionLiquidity": "<string>",
"signature": "<string>",
"amount0": "<string>",
"amount1": "<string>",
"outputProtocol": "V2",
"outputPosition": {
"pool": {
"token0": "<string>",
"token1": "<string>",
"fee": 123,
"tickSpacing": 123,
"hooks": "<string>"
},
"tickLower": 123,
"tickUpper": 123
},
"initialPrice": "<string>",
"outputPoolLiquidity": "<string>",
"outputCurrentTick": 123,
"outputSqrtRatioX96": "<string>",
"expectedTokenOwed0RawAmount": "<string>",
"expectedTokenOwed1RawAmount": "<string>",
"slippageTolerance": 123,
"deadline": 123,
"signatureDeadline": 123,
"simulateTransaction": false
}'
{
"requestId": "<string>",
"migrate": {
"to": "<string>",
"from": "<string>",
"data": "<string>",
"value": "<string>",
"gasLimit": "<string>",
"chainId": 1,
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"gasPrice": "<string>"
},
"gasFee": "<string>"
}
Assistant
Responses are generated using AI and may contain mistakes.