Create purchase order
curl --request POST \
--url https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fmarket_id": "<string>",
"product_id": 123,
"amount": 123
}
'import requests
url = "https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request"
payload = {
"fmarket_id": "<string>",
"product_id": 123,
"amount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fmarket_id: '<string>', product_id: 123, amount: 123})
};
fetch('https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fmarket_id' => '<string>',
'product_id' => 123,
'amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request"
payload := strings.NewReader("{\n \"fmarket_id\": \"<string>\",\n \"product_id\": 123,\n \"amount\": 123\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))
}HttpResponse<String> response = Unirest.post("https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fmarket_id\": \"<string>\",\n \"product_id\": 123,\n \"amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fmarket_id\": \"<string>\",\n \"product_id\": 123,\n \"amount\": 123\n}"
response = http.request(request)
puts response.read_body{
"verification_id": "<string>",
"verification_token_required": true,
"verification_token_expire_time": 123,
"code": "<string>",
"type": "<string>",
"type_label": "<string>",
"create_date": 123,
"create_date_format": "<string>",
"amount": 123,
"amount_net": 123,
"price": 123,
"volume": 123,
"fee_percent": 123,
"fee_amount": 123,
"product": {
"id": 123,
"name": "<string>",
"code": "<string>",
"short_name": "<string>",
"nav": 123,
"approval_date_label": "<string>",
"sale_payment_term": 123,
"order_book_closed_time_label": "<string>",
"receive_money_closed_time_label": "<string>",
"trading_session": 123,
"trading_session_format": "<string>",
"nav_date": "<string>",
"nav_to_previous_value": 123,
"nav_to_previous": 123,
"issuer_info": {
"id": 123,
"name": "<string>",
"short_name": "<string>",
"website": "<string>",
"avatar_url": "<string>"
},
"nav_change": {
"nav_to_3_months": 123,
"nav_to_6_months": 123,
"nav_to_12_months": 123,
"nav_to_36_months": 123,
"nav_to_beginning": 123,
"annualized_return_36_months": 123
}
},
"dst_product": {
"id": 123,
"name": "<string>",
"code": "<string>",
"short_name": "<string>",
"nav": 123,
"approval_date_label": "<string>",
"sale_payment_term": 123,
"order_book_closed_time_label": "<string>",
"receive_money_closed_time_label": "<string>",
"trading_session": 123,
"trading_session_format": "<string>",
"nav_date": "<string>",
"nav_to_previous_value": 123,
"nav_to_previous": 123,
"issuer_info": {
"id": 123,
"name": "<string>",
"short_name": "<string>",
"website": "<string>",
"avatar_url": "<string>"
},
"nav_change": {
"nav_to_3_months": 123,
"nav_to_6_months": 123,
"nav_to_12_months": 123,
"nav_to_36_months": 123,
"nav_to_beginning": 123,
"annualized_return_36_months": 123
}
},
"investor_bank_acc": {
"bank_id": "<string>",
"bank_swift_code": "<string>",
"bank_name": "<string>",
"bank_branch": "<string>",
"bank_acc_no": "<string>",
"bank_acc_name": "<string>",
"bin_code": "<string>"
},
"receive_money_bank_acc": {
"bank_id": "<string>",
"bank_swift_code": "<string>",
"bank_name": "<string>",
"bank_branch": "<string>",
"bank_acc_no": "<string>",
"bank_acc_name": "<string>",
"bin_code": "<string>"
},
"transfer_content": "<string>",
"tax_percent": 123,
"tax_amount": 123
}Fmarket
Create purchase order
POST
/
fmarket
/
v2
/
orders
/
create-purchase-order
/
request
Create purchase order
curl --request POST \
--url https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fmarket_id": "<string>",
"product_id": 123,
"amount": 123
}
'import requests
url = "https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request"
payload = {
"fmarket_id": "<string>",
"product_id": 123,
"amount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fmarket_id: '<string>', product_id: 123, amount: 123})
};
fetch('https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fmarket_id' => '<string>',
'product_id' => 123,
'amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request"
payload := strings.NewReader("{\n \"fmarket_id\": \"<string>\",\n \"product_id\": 123,\n \"amount\": 123\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))
}HttpResponse<String> response = Unirest.post("https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fmarket_id\": \"<string>\",\n \"product_id\": 123,\n \"amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fireant.vn/fmarket/v2/orders/create-purchase-order/request")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fmarket_id\": \"<string>\",\n \"product_id\": 123,\n \"amount\": 123\n}"
response = http.request(request)
puts response.read_body{
"verification_id": "<string>",
"verification_token_required": true,
"verification_token_expire_time": 123,
"code": "<string>",
"type": "<string>",
"type_label": "<string>",
"create_date": 123,
"create_date_format": "<string>",
"amount": 123,
"amount_net": 123,
"price": 123,
"volume": 123,
"fee_percent": 123,
"fee_amount": 123,
"product": {
"id": 123,
"name": "<string>",
"code": "<string>",
"short_name": "<string>",
"nav": 123,
"approval_date_label": "<string>",
"sale_payment_term": 123,
"order_book_closed_time_label": "<string>",
"receive_money_closed_time_label": "<string>",
"trading_session": 123,
"trading_session_format": "<string>",
"nav_date": "<string>",
"nav_to_previous_value": 123,
"nav_to_previous": 123,
"issuer_info": {
"id": 123,
"name": "<string>",
"short_name": "<string>",
"website": "<string>",
"avatar_url": "<string>"
},
"nav_change": {
"nav_to_3_months": 123,
"nav_to_6_months": 123,
"nav_to_12_months": 123,
"nav_to_36_months": 123,
"nav_to_beginning": 123,
"annualized_return_36_months": 123
}
},
"dst_product": {
"id": 123,
"name": "<string>",
"code": "<string>",
"short_name": "<string>",
"nav": 123,
"approval_date_label": "<string>",
"sale_payment_term": 123,
"order_book_closed_time_label": "<string>",
"receive_money_closed_time_label": "<string>",
"trading_session": 123,
"trading_session_format": "<string>",
"nav_date": "<string>",
"nav_to_previous_value": 123,
"nav_to_previous": 123,
"issuer_info": {
"id": 123,
"name": "<string>",
"short_name": "<string>",
"website": "<string>",
"avatar_url": "<string>"
},
"nav_change": {
"nav_to_3_months": 123,
"nav_to_6_months": 123,
"nav_to_12_months": 123,
"nav_to_36_months": 123,
"nav_to_beginning": 123,
"annualized_return_36_months": 123
}
},
"investor_bank_acc": {
"bank_id": "<string>",
"bank_swift_code": "<string>",
"bank_name": "<string>",
"bank_branch": "<string>",
"bank_acc_no": "<string>",
"bank_acc_name": "<string>",
"bin_code": "<string>"
},
"receive_money_bank_acc": {
"bank_id": "<string>",
"bank_swift_code": "<string>",
"bank_name": "<string>",
"bank_branch": "<string>",
"bank_acc_no": "<string>",
"bank_acc_name": "<string>",
"bin_code": "<string>"
},
"transfer_content": "<string>",
"tax_percent": 123,
"tax_amount": 123
}Ủy quyền
OAuth2 Implicit Grant
FlowNgầm định
- Authorization URL
- https://accounts.fireant.vn/connect/authorize
Scopes1
user-data-write
Cập nhật tất cả dữ liệu của người dùng hiện tại
Phản hồi
Thành công
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes