Download OpenAPI specification:Download
This is a sample server Memechelin server.
get order information by tx hash
| tx_hash | string tx hash or order id 两者必须有一个 |
{- "code": 10002,
- "data": {
- "base_token_amount": "string",
- "base_token_amount_usd": "string",
- "base_token_symbol": "string",
- "ca": "string",
- "message": "string",
- "order_type": 0,
- "priority_fee": "string",
- "quote_token_amount": "string",
- "quote_token_amount_usd": "string",
- "quote_token_symbol": "string",
- "slippage": "string",
- "state": 0,
- "tx_hash": "string",
- "wallet": "string"
}, - "message": "error request parameter"
}{- "code": 10002,
- "data": {
- "list": [
- {
- "base_token_amount": "string",
- "base_token_amount_usd": "string",
- "base_token_symbol": "string",
- "ca": "string",
- "message": "string",
- "order_type": 0,
- "priority_fee": "string",
- "quote_token_amount": "string",
- "quote_token_amount_usd": "string",
- "quote_token_symbol": "string",
- "slippage": "string",
- "state": 0,
- "tx_hash": "string",
- "wallet": "string"
}
], - "total": 0
}, - "message": "error request parameter"
}user buy or sell token
user place order req param
| amount | string 数量, 买入时为使用SOL的数量,eg "0.2","0.05";卖出时为CA的数量,eg, "100.23","200.5" Required: false |
| ca required | string <string> 购买的合约地址 Required: true |
| order_id | string 订单ID, 用于查询订单, 必须由前端传入, 使用int64类型 Required: false |
| order_type | integer <int> 订单类型, 买(0:使用SOL购买CA指定的代币)卖(1:卖出CA指定的代币) Required: true |
| percentage | string 按百分百买入或者卖出, 比如"50", 在买入时,按当前地址持有的SOL的50%购买CA指定的代币, 在卖出时,按当前地址持有的CA的50%卖出 Required: false |
| slippage | string 滑点, 2%, 3%, 输入值为2, 3 Required: false |
{- "amount": "string",
- "ca": "EWWDzCwq4UYW3ERTXbdgd6X6sdkKHFMJqRz1ZiFcpump",
- "order_id": "178342432432",
- "order_type": 0,
- "percentage": "string",
- "slippage": "string"
}{- "code": 10002,
- "data": {
- "ca": "string",
- "order_id": "string",
- "tx_hash": "string",
- "wallet": "string"
}, - "message": "error request parameter"
}order details and status by tx hash or order id
| tx_hash | string tx hash or order id 两者必须有一个 |
{- "code": 10002,
- "data": {
- "base_token_amount": "string",
- "base_token_amount_usd": "string",
- "base_token_symbol": "string",
- "ca": "string",
- "message": "string",
- "order_type": 0,
- "priority_fee": "string",
- "quote_token_amount": "string",
- "quote_token_amount_usd": "string",
- "quote_token_symbol": "string",
- "slippage": "string",
- "state": 0,
- "tx_hash": "string",
- "wallet": "string"
}, - "message": "error request parameter"
}{- "code": 10002,
- "data": {
- "auto_buy": 0,
- "auto_buy_amount": "0.5",
- "buy_fee_mode": "fast",
- "buy_priority_fee": "0.002",
- "mev_protect": 0,
- "sell_fee_mode": "fast",
- "sell_priority_fee": "0.002",
- "slippage": "2"
}, - "message": "error request parameter"
}set mev protect
user set mev protect req body param
| is_open | integer <int> 是否开启mev保护,1:开启,0:关闭 Required: true |
{- "is_open": 1
}{- "code": 10002,
- "data": null,
- "message": "error request parameter"
}user set tx priority fee
user set priority fee req body param
| fee_mode | string <string> Enum: "fast" "veryfast" "custom" 费率模式: fast, veryfast, custom Required: true |
| is_buy | boolean <boolean> 买卖优先费设置, true:buy, false:sell Required: true |
| priority_fee | string <string> 优先费,单位是SOL Required: true |
{- "fee_mode": "fast",
- "is_buy": true,
- "priority_fee": "0.002"
}{- "code": 10002,
- "data": null,
- "message": "error request parameter"
}user set quick buy(auto buy)
user quick buy req body param
| auto_buy | integer <int> 是否开启,自动购买,1:开启,0:关闭 Required: true |
| auto_buy_amount | string <string> 自动买数额,单位是SOL Required: true |
| slippage | string <string> 自动买滑点设置,1 为 1% Required: true |
{- "auto_buy": 0,
- "auto_buy_amount": "0.5",
- "slippage": "2"
}{- "code": 10002,
- "data": null,
- "message": "error request parameter"
}{- "code": 10002,
- "data": {
- "ema_landed_tips_50th_percentile": 0,
- "landed_tips_25th_percentile": 0,
- "landed_tips_50th_percentile": 0,
- "landed_tips_75th_percentile": 0,
- "landed_tips_95th_percentile": 0,
- "landed_tips_99th_percentile": 0
}, - "message": "error request parameter"
}batch add tokens
batch add tokens req param
| addresses | Array of strings token Addresses Required: true |
{- "addresses": [
- "string"
]
}{- "code": 10002,
- "data": null,
- "message": "error request parameter"
}get token info
| address required | string address, 不可空 |
{- "code": 10002,
- "data": {
- "address": "string",
- "chainId": "string",
- "decimals": 0,
- "dexUrls": [
- "string"
], - "logoURI": "string",
- "name": "string",
- "priceUsd": 0,
- "symbol": "string",
- "updateTime": 0
}, - "message": "error request parameter"
}{- "code": 10002,
- "data": {
- "address": "string",
- "alerted_at": "string",
- "body": "string",
- "create_time": 0,
- "decimals": 0,
- "name": "string",
- "sentiment": "neutral",
- "source": "string",
- "symbol": "string",
- "title": "string",
- "url": "string"
}, - "message": "error request parameter"
}push tokens from ai platform
push tokens from ai platform body param
| body | string 新闻内容 |
| create_time | integer 新闻创建时间 |
| news_id | string 新闻在数据库的唯一标识 |
| source | string 新闻源 |
Array of objects (entity.Suggestion) 代币推荐列表 | |
| title | string 新闻标题 |
{- "body": "string",
- "create_time": 0,
- "news_id": "string",
- "source": "string",
- "suggestions": [
- {
- "ca": "string",
- "sentiment": "neutral",
- "symbol": "string"
}
], - "title": "string"
}{- "code": 10002,
- "data": null,
- "message": "error request parameter"
}get user information by user id or user telegram id
| user_id | string user id, 可空 |
| user_tg_id | string user telegram id, 可空, 空的话取header中的tg-token |
{- "code": 10002,
- "data": {
- "id": 0,
- "user_id": "string",
- "user_name": "string",
- "user_tg_id": "string",
- "user_tier": 0,
- "wallets": [
- {
- "id": 0,
- "private_key": "string",
- "public_key": "string",
- "ui_balance": "string",
- "usd_balance": "string",
- "wallet_id": "string",
- "wallet_name": "string",
- "wallet_type": "string"
}
]
}, - "message": "error request parameter"
}user register to backend system, if user exist, return user info
user register request param
string <string> 邮箱, 可空 Required: false | |
| user_name | string <string> 用户名, 可空 Required: false |
| user_tg_id required | string <string> 用户tg id Required: true |
{- "email": "alice@gmail.com",
- "user_name": "alice",
- "user_tg_id": "user telegram id"
}{- "code": 10002,
- "data": {
- "user_id": "string",
- "user_tg_id": "string",
- "user_tier": 0
}, - "message": "error request parameter"
}user singin, user use tg id to signin, if not exist, create a new user
user signin req param
| user_tg_id | string <string> 用户tg id 必须唯一 |
{- "user_tg_id": "23671236176"
}{- "code": 10002,
- "data": {
- "user_id": "string",
- "user_tg_id": "string"
}, - "message": "error request parameter"
}update user info by user id or user telegram id
user info update request param
string <string> 邮箱 | |
| user_id | string <string> 用户ID, 可空 |
| user_name | string <string> 用户名 |
| user_tg_id | string <string> 用户tg id, 用户 Required: true |
{- "email": "alice@gmail.com",
- "user_id": "ydafadfeq",
- "user_name": "alice",
- "user_tg_id": "213124341243"
}{- "code": 10002,
- "data": null,
- "message": "error request parameter"
}user create wallet by user telegram id, if user not exist, create a new user and wallet
| x-request-id required | string request id, 客户端生成的唯一ID |
create wallet req param
| user_tg_id required | string 用户tg id Required: true |
{- "user_tg_id": "string"
}{- "code": 10002,
- "data": {
- "user_tg_id": "string",
- "wallets": [
- {
- "public_key": "string",
- "wallet_id": "string"
}
]
}, - "message": "error request parameter"
}delete wallet by wallet id
user signin req param
| user_tg_id | string 用户tg id Required: true |
| wallet_id | string 钱包id Required: false |
{- "user_tg_id": "string",
- "wallet_id": "string"
}{- "code": 10002,
- "data": null,
- "message": "error request parameter"
}import wallet by user telegram id and private key, if user not exist, create a new user and wallet
| x-request-id required | string request id, 客户端生成的唯一ID |
user signin req param
| private_key | string 钱包私钥 Required: true |
| user_tg_id | string 用户tg id Required: true |
{- "private_key": "string",
- "user_tg_id": "string"
}{- "code": 10002,
- "data": {
- "public_key": "string",
- "user_tg_id": "string",
- "wallet_id": "string"
}, - "message": "error request parameter"
}get wallet information by user id, user telegram id or wallet id
| user_tg_id | string user telegram id, 可空 |
| wallet_id | string wallet id, 可空 |
{- "code": 10002,
- "data": {
- "id": 0,
- "private_key": "string",
- "public_key": "string",
- "ui_balance": "string",
- "usd_balance": "string",
- "wallet_id": "string",
- "wallet_name": "string",
- "wallet_type": "string"
}, - "message": "error request parameter"
}list user wallets by user id or user telegram id
| user_tg_id | string user telegram id, 可空 |
| user_id | string wallet id, 可空 |
{- "code": 10002,
- "data": {
- "user_tg_id": "string",
- "wallets": [
- {
- "id": 0,
- "private_key": "string",
- "public_key": "string",
- "ui_balance": "string",
- "usd_balance": "string",
- "wallet_id": "string",
- "wallet_name": "string",
- "wallet_type": "string"
}
]
}, - "message": "error request parameter"
}get pageable wallet portfolio, and page should start from 1
| wallet_id required | string wallet_id |
| page required | integer page |
| size required | integer size |
{- "code": 10002,
- "data": {
- "balance": "string",
- "pages": 0,
- "positions": [
- {
- "address": "string",
- "pnl": "string",
- "residual_sol_ui_amount": "string",
- "residual_token_ui_amount": "string",
- "residual_token_usd_value": "string",
- "sol_pnl": "string",
- "token_info": {
- "address": "string",
- "chainId": "string",
- "decimals": 0,
- "logoURI": "string",
- "name": "string",
- "priceUsd": 0,
- "symbol": "string",
- "updateTime": 0
}
}
], - "pub_key": "string",
- "ui_balance": "string",
- "update_time": "string",
- "usd_balance": "string"
}, - "message": "error request parameter"
}Refresh wallet portfolio
| wallet_id required | string Wallet ID |
| page required | integer Page number |
| size required | integer Page size |
{- "code": 10002,
- "data": {
- "balance": "string",
- "pages": 0,
- "positions": [
- {
- "address": "string",
- "pnl": "string",
- "residual_sol_ui_amount": "string",
- "residual_token_ui_amount": "string",
- "residual_token_usd_value": "string",
- "sol_pnl": "string",
- "token_info": {
- "address": "string",
- "chainId": "string",
- "decimals": 0,
- "logoURI": "string",
- "name": "string",
- "priceUsd": 0,
- "symbol": "string",
- "updateTime": 0
}
}
], - "pub_key": "string",
- "ui_balance": "string",
- "update_time": "string",
- "usd_balance": "string"
}, - "message": "error request parameter"
}retrieve the holdings of a specific token in a user's portfolio.
| wallet_id required | string wallet_id |
| token_address required | string token_address |
{- "code": 10002,
- "data": {
- "address": "string",
- "pnl": "string",
- "residual_sol_ui_amount": "string",
- "residual_token_ui_amount": "string",
- "residual_token_usd_value": "string",
- "sol_pnl": "string",
- "token_info": {
- "address": "string",
- "chainId": "string",
- "decimals": 0,
- "logoURI": "string",
- "name": "string",
- "priceUsd": 0,
- "symbol": "string",
- "updateTime": 0
}
}, - "message": "error request parameter"
}update wallet info by wallet id
user signin req param
| user_tg_id | string 用户tg id Required: false |
| wallet_id | string 钱包id Required: false |
| wallet_name required | string 钱包名称 Required: true |
{- "user_tg_id": "string",
- "wallet_id": "string",
- "wallet_name": "string"
}{- "code": 10002,
- "data": null,
- "message": "error request parameter"
}withdraw wallet balance to target address, return tx hash
| x-request-id required | string request id, 客户端生成的唯一ID |
user signin req param
| amount | string 转账金额, 转移多少个SOL Required: true |
| targe_addr | string 目标地址 Required: true |
| user_tg_id | string 用户tg id Required: true |
| wallet_id | string 钱包id Required: false |
{- "amount": "string",
- "targe_addr": "string",
- "user_tg_id": "string",
- "wallet_id": "string"
}{- "code": 10002,
- "data": {
- "tx_hash": "string",
- "user_tg_id": "string",
- "wallet_id": "string"
}, - "message": "error request parameter"
}