Đăng ký quyền mua
Đăng ký quyền mua
curl --request POST \
--url https://api-gw.verolabs.co/api/v1/users/right-subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"symbol": "<string>",
"shares": 2
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({symbol: '<string>', shares: 2})
};
fetch('https://api-gw.verolabs.co/api/v1/users/right-subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-gw.verolabs.co/api/v1/users/right-subscriptions"
payload = {
"symbol": "<string>",
"shares": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-gw.verolabs.co/api/v1/users/right-subscriptions"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"shares\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://api-gw.verolabs.co/api/v1/users/right-subscriptions");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"symbol\": \"<string>\",\n \"shares\": 2\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);falseCURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-gw.verolabs.co/api/v1/users/right-subscriptions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"symbol\": \"<string>\",\n \"shares\": 2\n}");
CURLcode ret = curl_easy_perform(hnd);{
"status": "<string>",
"message": "<string>",
"subscription": {
"id": 123,
"accountId": "<string>",
"ruleId": 123,
"symbol": "<string>",
"eligibleShares": 123,
"maxNewShares": 123,
"subscribedShares": 123,
"remainingShares": 123,
"price": 123,
"heldAmount": 123,
"rejectReason": "<string>",
"endDate": "2023-12-25",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"heldAmount": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}Ủy quyền
Bearer token used for protected REST API requests.
Nội dung
Right subscription request payload. symbol and shares are required.
Phản hồi
Submitted right subscription request.
Response returned after submitting a right subscription request.
success or failed.
Human-readable result.
Right subscription request/entitlement for one account.
Hide child attributes
Hide child attributes
User subscription id.
Account eligible for the right subscription.
Source right subscription rule id.
Subscribed symbol.
Shares held or eligible for the entitlement.
Maximum new shares that can be subscribed.
Shares requested by the user.
Remaining shares that can still be subscribed.
Subscription price per share.
Credit amount held for pending subscription.
Subscription request status.
pending, approved, rejected, expired Reason when rejected.
Subscription end date.
Creation timestamp.
Last update timestamp.
Credit amount held by the backend.
curl --request POST \
--url https://api-gw.verolabs.co/api/v1/users/right-subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"symbol": "<string>",
"shares": 2
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({symbol: '<string>', shares: 2})
};
fetch('https://api-gw.verolabs.co/api/v1/users/right-subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-gw.verolabs.co/api/v1/users/right-subscriptions"
payload = {
"symbol": "<string>",
"shares": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-gw.verolabs.co/api/v1/users/right-subscriptions"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"shares\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://api-gw.verolabs.co/api/v1/users/right-subscriptions");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"symbol\": \"<string>\",\n \"shares\": 2\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);falseCURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-gw.verolabs.co/api/v1/users/right-subscriptions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"symbol\": \"<string>\",\n \"shares\": 2\n}");
CURLcode ret = curl_easy_perform(hnd);{
"status": "<string>",
"message": "<string>",
"subscription": {
"id": 123,
"accountId": "<string>",
"ruleId": 123,
"symbol": "<string>",
"eligibleShares": 123,
"maxNewShares": 123,
"subscribedShares": 123,
"remainingShares": 123,
"price": 123,
"heldAmount": 123,
"rejectReason": "<string>",
"endDate": "2023-12-25",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"heldAmount": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}
