交易所接口
This commit is contained in:
@@ -50,7 +50,7 @@ func (j *JttClient) FindUserForTokenMessage(address string) (res *FindUserForTok
|
|||||||
paramMap["publicKey"] = j.PublicKey
|
paramMap["publicKey"] = j.PublicKey
|
||||||
paramMap["address"] = address
|
paramMap["address"] = address
|
||||||
|
|
||||||
postRes, err := j.JttPost(paramMap)
|
postRes, err := j.JttPost("/findUserForTokenMessage", paramMap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -71,6 +71,7 @@ func (j *JttClient) FindUserForTokenMessage(address string) (res *FindUserForTok
|
|||||||
}
|
}
|
||||||
|
|
||||||
type FindUserForTokenMessageRes struct {
|
type FindUserForTokenMessageRes struct {
|
||||||
|
Code int `json:"code"`
|
||||||
Data *Data `json:"data"`
|
Data *Data `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,11 +86,11 @@ type UserToken struct {
|
|||||||
WalletAddress string `json:"walletAddress"`
|
WalletAddress string `json:"walletAddress"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (j *JttClient) JttPost(paramMap map[string]any) (res []byte, err error) {
|
func (j *JttClient) JttPost(url string, paramMap map[string]any) (res []byte, err error) {
|
||||||
|
|
||||||
bodyByte, _ := json.Marshal(paramMap)
|
bodyByte, _ := json.Marshal(paramMap)
|
||||||
|
|
||||||
req, err := http.NewRequest(http.MethodPost, j.ApiUrl+"/findUserForTokenMessage", bytes.NewBuffer(bodyByte))
|
req, err := http.NewRequest(http.MethodPost, j.ApiUrl+url, bytes.NewBuffer(bodyByte))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user