Memechelin API (1.0)

Download OpenAPI specification:Download

This is a sample server Memechelin server.

order

get order information

get order information by tx hash

Authorizations:
ApiKeyAuth
query Parameters
tx_hash
string

tx hash or order id 两者必须有一个

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

list current user's order list

list current user's order list

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

user place order

user buy or sell token

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

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

Responses

Request samples

Content type
application/json
{
  • "amount": "string",
  • "ca": "EWWDzCwq4UYW3ERTXbdgd6X6sdkKHFMJqRz1ZiFcpump",
  • "order_id": "178342432432",
  • "order_type": 0,
  • "percentage": "string",
  • "slippage": "string"
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

get order details and status

order details and status by tx hash or order id

Authorizations:
ApiKeyAuth
query Parameters
tx_hash
string

tx hash or order id 两者必须有一个

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

preset

get user tx preset

get user tx preset

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

set mev protect

set mev protect

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

user set mev protect req body param

is_open
integer <int>

是否开启mev保护,1:开启,0:关闭 Required: true

Responses

Request samples

Content type
application/json
{
  • "is_open": 1
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": null,
  • "message": "error request parameter"
}

user set tx priority fee

user set tx priority fee

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

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

Responses

Request samples

Content type
application/json
{
  • "fee_mode": "fast",
  • "is_buy": true,
  • "priority_fee": "0.002"
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": null,
  • "message": "error request parameter"
}

user set quick buy(auto buy)

user set quick buy(auto buy)

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

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

Responses

Request samples

Content type
application/json
{
  • "auto_buy": 0,
  • "auto_buy_amount": "0.5",
  • "slippage": "2"
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": null,
  • "message": "error request parameter"
}

get suggestion tips

get suggestion tips

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

token

batch add tokens

batch add tokens

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

batch add tokens req param

addresses
Array of strings

token Addresses Required: true

Responses

Request samples

Content type
application/json
{
  • "addresses": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": null,
  • "message": "error request parameter"
}

get token info

get token info

Authorizations:
ApiKeyAuth
query Parameters
address
required
string

address, 不可空

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

get latest recommend token list

get latest recommend token list

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

push tokens from ai platform

push tokens from ai platform

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

push tokens from ai platform body param

body
string

新闻内容

create_time
integer

新闻创建时间

news_id
string

新闻在数据库的唯一标识

source
string

新闻源

Array of objects (entity.Suggestion)

代币推荐列表

title
string

新闻标题

Responses

Request samples

Content type
application/json
{
  • "body": "string",
  • "create_time": 0,
  • "news_id": "string",
  • "source": "string",
  • "suggestions": [
    ],
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": null,
  • "message": "error request parameter"
}

user

get user information

get user information by user id or user telegram id

Authorizations:
ApiKeyAuth
query Parameters
user_id
string

user id, 可空

user_tg_id
string

user telegram id, 可空, 空的话取header中的tg-token

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

User Register

user register to backend system, if user exist, return user info

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

user register request param

email
string <string>

邮箱, 可空 Required: false

user_name
string <string>

用户名, 可空 Required: false

user_tg_id
required
string <string>

用户tg id Required: true

Responses

Request samples

Content type
application/json
{
  • "email": "alice@gmail.com",
  • "user_name": "alice",
  • "user_tg_id": "user telegram id"
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

User Signin

user singin, user use tg id to signin, if not exist, create a new user

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

user signin req param

user_tg_id
string <string>

用户tg id 必须唯一

Responses

Request samples

Content type
application/json
{
  • "user_tg_id": "23671236176"
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

User info update

update user info by user id or user telegram id

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

user info update request param

email
string <string>

邮箱

user_id
string <string>

用户ID, 可空

user_name
string <string>

用户名

user_tg_id
string <string>

用户tg id, 用户 Required: true

Responses

Request samples

Content type
application/json
{
  • "email": "alice@gmail.com",
  • "user_id": "ydafadfeq",
  • "user_name": "alice",
  • "user_tg_id": "213124341243"
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": null,
  • "message": "error request parameter"
}

wallet

User create wallet

user create wallet by user telegram id, if user not exist, create a new user and wallet

Authorizations:
ApiKeyAuth
header Parameters
x-request-id
required
string

request id, 客户端生成的唯一ID

Request Body schema: application/json
required

create wallet req param

user_tg_id
required
string

用户tg id Required: true

Responses

Request samples

Content type
application/json
{
  • "user_tg_id": "string"
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

delete wallet

delete wallet by wallet id

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

user signin req param

user_tg_id
string

用户tg id Required: true

wallet_id
string

钱包id Required: false

Responses

Request samples

Content type
application/json
{
  • "user_tg_id": "string",
  • "wallet_id": "string"
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": null,
  • "message": "error request parameter"
}

import wallet

import wallet by user telegram id and private key, if user not exist, create a new user and wallet

Authorizations:
ApiKeyAuth
header Parameters
x-request-id
required
string

request id, 客户端生成的唯一ID

Request Body schema: application/json
required

user signin req param

private_key
string

钱包私钥 Required: true

user_tg_id
string

用户tg id Required: true

Responses

Request samples

Content type
application/json
{
  • "private_key": "string",
  • "user_tg_id": "string"
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

get wallet information

get wallet information by user id, user telegram id or wallet id

Authorizations:
ApiKeyAuth
query Parameters
user_tg_id
string

user telegram id, 可空

wallet_id
string

wallet id, 可空

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

list wallets

list user wallets by user id or user telegram id

Authorizations:
ApiKeyAuth
query Parameters
user_tg_id
string

user telegram id, 可空

user_id
string

wallet id, 可空

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

get pageable wallet portfolio

get pageable wallet portfolio, and page should start from 1

Authorizations:
ApiKeyAuth
query Parameters
wallet_id
required
string

wallet_id

page
required
integer

page

size
required
integer

size

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

Refresh wallet portfolio

Refresh wallet portfolio

Authorizations:
ApiKeyAuth
query Parameters
wallet_id
required
string

Wallet ID

page
required
integer

Page number

size
required
integer

Page size

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

retrieve the holdings of a specific token in a user's portfolio.

retrieve the holdings of a specific token in a user's portfolio.

Authorizations:
ApiKeyAuth
query Parameters
wallet_id
required
string

wallet_id

token_address
required
string

token_address

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

update wallet info

update wallet info by wallet id

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

user signin req param

user_tg_id
string

用户tg id Required: false

wallet_id
string

钱包id Required: false

wallet_name
required
string

钱包名称 Required: true

Responses

Request samples

Content type
application/json
{
  • "user_tg_id": "string",
  • "wallet_id": "string",
  • "wallet_name": "string"
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": null,
  • "message": "error request parameter"
}

withdraw wallet to target address

withdraw wallet balance to target address, return tx hash

Authorizations:
ApiKeyAuth
header Parameters
x-request-id
required
string

request id, 客户端生成的唯一ID

Request Body schema: application/json
required

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

Responses

Request samples

Content type
application/json
{
  • "amount": "string",
  • "targe_addr": "string",
  • "user_tg_id": "string",
  • "wallet_id": "string"
}

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}

get withdraw limit

get withdraw limit

Authorizations:
ApiKeyAuth
query Parameters
wallet_id
string

Wallet ID

Responses

Response samples

Content type
application/json
{
  • "code": 10002,
  • "data": {
    },
  • "message": "error request parameter"
}