acta-maker-sdk
Rust SDK for Acta options market makers. Handles WebSocket connectivity, authentication, order signing, and message serialization.
Two API levels:
ManagedWs— auto-reconnect, auto-auth,send_await()for request-response. Use this for production bots.WsClient— raw WebSocket client. You manage the connection yourself. Good for scripts and testing.
No features enabled by default — lightweight core with opt-in WS and Solana support.
Install
[]
= { = "0.1.0", = ["ws-client"] }
| Feature | What it enables |
|---|---|
ws-client |
WebSocket client (WsClient, ManagedWs), requires tokio |
chain |
Solana instruction builders (DepositPremium, WithdrawPremium, FundPosition) |
chain-rpc |
Solana RPC queries (extends chain) |
test-helpers |
Test utilities (ManagedWsHandle::test_handle, message injection) |
Quick start (ManagedWs)
use *;
use *;
use *;
use Arc;
let signer = from_keypair;
let signer_for_auth = signer.clone;
let config = new;
let handle = spawn_managed_ws;
// handle.send(), handle.subscribe_messages(), handle.send_await()
Quick start (WsClient)
use ;
use WS_PROTOCOL_VERSION;
let mut client = connect.await?;
client.send_hello.await?;
while let Some = client.next.await
Order signing
let args = OrderPreimageArgs ;
let order_id = compute_order_id;
let signature = sign_order_id_with_signer;
BytesSigner wraps an Ed25519 keypair with Zeroize on drop. Implement SignerLike to plug in HSM/KMS.
Value sets (string enums)
These are String on the wire; the SDK provides enums for known value sets:
PositionType:"covered_call"|"cash_secured_put"QuoteStatus:"pending"|"best"|"outbid"|"filled"|"expired"QuoteCancelReason:"requested"|"risk_check"|"rfq_accepted"RfqAvailableAgainReason:"signature_timeout"|"tx_failed"|"tx_build_failed"RfqCloseReason:"expired"|"taker_cancelled"|"filled"|"market_expired"|"ladder_timeout"|"order_failed"|"signature_timeout"QuoteFinalStatus:"expired"|"outbid"|"cancelled"|"filled"PositionUpdateType:"created"|"funded"|"liquidated"|"settled"
Some status fields are raw strings from the backend (e.g. OrderStatusMessage.status, PositionInfo.status).
Examples
Examples require the ws-client feature:
Subscribe to RFQs + chain events
use ;
let mut client = connect.await?;
client
.subscribe
.await?;
Send a quote
use ;
client
.quote
.await?;
Discovery APIs
use ;
client
.get_my_quotes
.await?;
client
.get_maker_positions
.await?;
Cancel quote(s)
use ;
client
.cancel_quote
.await?;
client
.cancel_all_quotes
.await?;
Documentation
Full documentation is available at docs.acta.markets:
- Rust SDK integration guide
- Wire examples (JSON and Rust)
- Maker API reference (all WS messages)
- Sandbox / devnet setup
- FAQ and troubleshooting
License
MIT