Class: Melaya::AccountAPI
- Inherits:
-
Object
- Object
- Melaya::AccountAPI
- Defined in:
- lib/melaya/account.rb
Overview
Account API — authenticated reads about your Melaya account.
Connected-exchange key references (masked), tier limits, and live usage counters. Requires an mk_ key on the private plane.
Instance Method Summary collapse
-
#api_key_status ⇒ Object
Status of your platform API key (tier, max concurrent connections).
-
#initialize(http) ⇒ AccountAPI
constructor
A new instance of AccountAPI.
-
#keys ⇒ Object
The exchange API keys connected to your account.
-
#usage ⇒ Object
Tier, plan limits, and live usage counters (mirrors the dashboard’s usage page).
Constructor Details
#initialize(http) ⇒ AccountAPI
Returns a new instance of AccountAPI.
9 10 11 |
# File 'lib/melaya/account.rb', line 9 def initialize(http) @http = http end |
Instance Method Details
#api_key_status ⇒ Object
Status of your platform API key (tier, max concurrent connections).
26 27 28 |
# File 'lib/melaya/account.rb', line 26 def api_key_status @http.get("/api/v1/private/api-key") end |
#keys ⇒ Object
The exchange API keys connected to your account. api_key is masked (display-only); use api_key_id (e.g. BINANCEUSDM_0) when launching strategies or minting a private stream ticket.
16 17 18 |
# File 'lib/melaya/account.rb', line 16 def keys @http.get("/api/v1/private/keys")["keys"] end |
#usage ⇒ Object
Tier, plan limits, and live usage counters (mirrors the dashboard’s usage page).
21 22 23 |
# File 'lib/melaya/account.rb', line 21 def usage @http.get("/api/v1/private/usage") end |