> ## Documentation Index
> Fetch the complete documentation index at: https://flashapi.phs.vn/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAPI Registration Form

> Please complete the registration form below to request access to PHS OpenAPI (Flash API). 

<form noValidate id="oapi-registration-form">
  ⚠️

  Error message

  ✕

  {[1, 2, 3, 4].map((num) => {
                                                                  const titles = [
                                                                      "1. Client information",
                                                                      "2. API scope",
                                                                      "3. Technical information",
                                                                      "4. Client undertakings",
                                                                  ];
                                                                  return (
                                                                      <button
                                                                          key={`mobile-${num}`}
                                                                          type="button"
                                                                          id={`mobile-tab-btn-${num}`}
                                                                          onClick={() => {
                                                                              [1, 2, 3, 4].forEach((n) => {
                                                                                  if (document.getElementById(`step-${n}`))
                                                                                      document.getElementById(`step-${n}`).style.display = "none";
                                                                                  const mBtn = document.getElementById(`mobile-tab-btn-${n}`);
                                                                                  const dBtn = document.getElementById(`desktop-tab-btn-${n}`);
                                                                                  if (mBtn) {
                                                                                      mBtn.style.backgroundColor = "transparent";
                                                                                      mBtn.style.color = "inherit";
                                                                                      mBtn.style.borderColor = "currentColor";
                                                                                  }
                                                                                  if (dBtn) {
                                                                                      dBtn.style.backgroundColor = "transparent";
                                                                                      dBtn.style.color = "inherit";
                                                                                      dBtn.style.borderColor = "currentColor";
                                                                                  }
                                                                              });

                                                                              document.getElementById(`step-${num}`).style.display = "flex";
                                                                              const curM = document.getElementById(`mobile-tab-btn-${num}`);
                                                                              const curD = document.getElementById(`desktop-tab-btn-${num}`);
                                                                              if (curM) {
                                                                                  curM.style.backgroundColor = "#15803d";
                                                                                  curM.style.color = "#ffffff";
                                                                                  curM.style.borderColor = "#15803d";
                                                                              }
                                                                              if (curD) {
                                                                                  curD.style.backgroundColor = "#15803d";
                                                                                  curD.style.color = "#ffffff";
                                                                                  curD.style.borderColor = "#15803d";
                                                                              }

                                                                              document.getElementById('oapi-registration-form')?.scrollIntoView({
                                                                                  behavior: 'smooth',
                                                                                  block: 'start'
                                                                              });
                                                                          }}
                                                                          style={{
                                                                              flex: "1 1 45%",
                                                                              minWidth: "140px",
                                                                              padding: "10px 8px",
                                                                              borderRadius: "6px",
                                                                              fontSize: "13px",
                                                                              fontWeight: "bold",
                                                                              border: num === 1 ? "1px solid #15803d" : "1px solid currentColor",
                                                                              cursor: "pointer",
                                                                              backgroundColor: num === 1 ? "#15803d" : "transparent",
                                                                              color: num === 1 ? "#ffffff" : "inherit",
                                                                              textAlign: "center",
                                                                              boxSizing: "border-box",
                                                                          }}
                                                                      >
                                                                          {titles[num - 1]}
                                                                      </button>
                                                                  );
                                                              })}

  {[1, 2, 3, 4].map((num) => {
                                          const titles = [
                                              "1. Client information",
                                              "2. API scope",
                                              "3. Technical information",
                                              "4. Client undertakings",
                                          ];
                                          return (
                                              <button
                                                  key={`desktop-${num}`}
                                                  type="button"
                                                  id={`desktop-tab-btn-${num}`}
                                                  onClick={() => {
                                                      [1, 2, 3, 4].forEach((n) => {
                                                          if (document.getElementById(`step-${n}`))
                                                              document.getElementById(`step-${n}`).style.display = "none";
                                                          const mBtn = document.getElementById(`mobile-tab-btn-${n}`);
                                                          const dBtn = document.getElementById(`desktop-tab-btn-${n}`);
                                                          if (mBtn) {
                                                              mBtn.style.backgroundColor = "transparent";
                                                              mBtn.style.color = "inherit";
                                                              mBtn.style.borderColor = "currentColor";
                                                          }
                                                          if (dBtn) {
                                                              dBtn.style.backgroundColor = "transparent";
                                                              dBtn.style.color = "inherit";
                                                              dBtn.style.borderColor = "currentColor";
                                                          }
                                                      });

                                                      document.getElementById(`step-${num}`).style.display = "flex";
                                                      const curM = document.getElementById(`mobile-tab-btn-${num}`);
                                                      const curD = document.getElementById(`desktop-tab-btn-${num}`);
                                                      if (curM) {
                                                          curM.style.backgroundColor = "#15803d";
                                                          curM.style.color = "#ffffff";
                                                          curM.style.borderColor = "#15803d";
                                                      }
                                                      if (curD) {
                                                          curD.style.backgroundColor = "#15803d";
                                                          curD.style.color = "#ffffff";
                                                          curD.style.borderColor = "#15803d";
                                                      }

                                                      document.getElementById('oapi-registration-form')?.scrollIntoView({
                                                          behavior: 'smooth',
                                                          block: 'start'
                                                      });
                                                  }}
                                                  style={{
                                                      flex: 1,
                                                      padding: "4px 8px",
                                                      borderRadius: "5px",
                                                      fontSize: "12px",
                                                      fontWeight: "bold",
                                                      border: num === 1 ? "1px solid #15803d" : "1px solid currentColor",
                                                      cursor: "pointer",
                                                      backgroundColor: num === 1 ? "#15803d" : "transparent",
                                                      color: num === 1 ? "#ffffff" : "inherit",
                                                      textAlign: "center",
                                                      transition: "all 0.2s",
                                                      whiteSpace: "nowrap",
                                                  }}
                                              >
                                                  {titles[num - 1]}
                                              </button>
                                          );
                                      })}

  Article 1. Client information

  Client / Organization name \*

  Depository number / Account at PHS \*

  API Sub-accounts

  Underlying sub-account

  Derivatives sub-account

  Contact Information

  Email (email registered with PHS) \*

  Phone \*

  Next: API scope ➔

  Article 2. Requested API scope (Production)

  Select the API groups you wish to register:

  {[
                                                                                          {
                                                                                              val: "auth_security",
                                                                                              title: "Authentication & Security",
                                                                                              sub: "Authentication & Security / issue API Key, Secret Key, Access Token",
                                                                                              checked: true,
                                                                                          },
                                                                                          {
                                                                                              val: "trading_equity",
                                                                                              title: "Trading API – underlying securities",
                                                                                              sub: "place/amend/cancel orders, order inquiry",
                                                                                          },
                                                                                          {
                                                                                              val: "trading_derivatives",
                                                                                              title: "Trading API – derivatives",
                                                                                              sub: "place/amend/cancel orders, OTP, order, inquiry",
                                                                                          },
                                                                                          {
                                                                                              val: "account_api",
                                                                                              title: "Account API",
                                                                                              sub: "balances, portfolio, buying power, margin obligations",
                                                                                          },
                                                                                          {
                                                                                              val: "market_data",
                                                                                              title: "Market Data API / Historical Candles",
                                                                                              sub: "Retrieve market data and historical candlesticks.",
                                                                                          },
                                                                                          {
                                                                                              val: "websocket_streaming",
                                                                                              title: "Streaming / WebSocket",
                                                                                              sub: "account / instrument / trade",
                                                                                          },
                                                                                          {
                                                                                              val: "developer_portal",
                                                                                              title: "API Playground / Developer Portal",
                                                                                              sub: "API sandbox access",
                                                                                          },
                                                                                      ].map((scope) => (
                                                                                          <label
                                                                                              key={scope.val}
                                                                                              style={{
                                                                                                  display: "flex",
                                                                                                  gap: "12px",
                                                                                                  alignItems: "center",
                                                                                                  padding: "12px 16px",
                                                                                                  border: "1px solid currentColor",
                                                                                                  borderRadius: "8px",
                                                                                                  cursor: "pointer",
                                                                                              }}
                                                                                          >
                                                                                              <input
                                                                                                  type="checkbox"
                                                                                                  name="apiScope"
                                                                                                  value={scope.val}
                                                                                                  defaultChecked={scope.checked}
                                                                                                  style={{
                                                                                                      width: "18px",
                                                                                                      height: "18px",
                                                                                                      cursor: "pointer",
                                                                                                      accentColor: "#15803d",
                                                                                                  }}
                                                                                              />
                                                                                              <div style={{ display: "flex", flexDirection: "column", gap: "2px" }}>
                                                                                                  <strong style={{ fontSize: "14px" }}>{scope.title}</strong>
                                                                                                  <span style={{ fontSize: "13px", opacity: 0.7 }}>{scope.sub}</span>
                                                                                              </div>
                                                                                          </label>
                                                                                      ))}

  Note / account scope

  Back to Step 1

  Next: Technical information ➔

  Article 3. Registered technical information

  Registered WAN IP / IP whitelist \*

  ?

  How to get your WAN IP

  <ol>
    <li>Connect your computer to the Internet network you will use to access OpenAPI.</li>
    <li>Open Google and search for “What is my IP”.</li>
    <li>Provide the IPv4 public IP address that is displayed.</li>
  </ol>

  Application developer/operator

  &#x20;

  In-house

  &#x20;

  Third party:

  Expected production go-live date

  Back to Step 2

  Next: Client undertakings ➔

  Article 4. Client undertakings

  Please check the boxes to confirm acceptance of all the terms below:

  Select all

  {[
                                                                                          "The Client has opened and maintains a securities trading account at PHS; for each API type, the Client has completed or will complete the corresponding product/account documents before production use.",
                                                                                          "The Client has read, understood and agreed to the PHS OpenAPI Terms and Conditions, the Risk Disclosure, the API Documentation, the online trading rules and the relevant account contracts/documents at PHS.",
                                                                                          "The Client is responsible for protecting the API Credentials, managing the API-Integrated Application and all requests/orders arising through the API.",
                                                                                          "The Client undertakes not to use the API to manipulate the market, abuse the market, submit disruptive orders, test vulnerabilities, exceed API limits, redistribute data without authorization or commit acts prohibited by law.",
                                                                                          "The Client agrees that PHS may monitor, log, apply limits, suspend or revoke API access when necessary to protect the system, the market, investors or to comply with law/competent authority requirements.",
                                                                                      ].map((text, idx) => (
                                                                                          <label
                                                                                              key={idx}
                                                                                              style={{
                                                                                                  display: "flex",
                                                                                                  gap: "10px",
                                                                                                  alignItems: "center",
                                                                                                  cursor: "pointer",
                                                                                              }}
                                                                                          >
                                                                                              <input
                                                                                                  type="checkbox"
                                                                                                  name="commitments"
                                                                                                  required
                                                                                                  onChange={() => {
                                                                                                      const all = document.querySelectorAll('input[name="commitments"]');
                                                                                                      const checked = document.querySelectorAll('input[name="commitments"]:checked');
                                                                                                      const toggleAll = document.getElementById("toggle-all-commitments");
                                                                                                      if (toggleAll) toggleAll.checked = all.length === checked.length;
                                                                                                  }}
                                                                                                  style={{
                                                                                                      width: "18px",
                                                                                                      height: "18px",
                                                                                                      flexShrink: 0,
                                                                                                      cursor: "pointer",
                                                                                                      accentColor: "#15803d",
                                                                                                  }}
                                                                                              />
                                                                                              <span>{text}</span>
                                                                                          </label>
                                                                                      ))}

  Back to Step 3

  Submit Application
</form>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.