Skip to main content
Builderz studio wordmark beside a layered paper sculpture

Solana Perps Integration Acceptance Tests

BUILDERZ

BUILDERZ

Share

In this guide

The decisions and working steps ahead.

Follow the order after confirmation

Test price data, margin, and funding separately

Hand support an order reference

A tester places a limit order and reloads the app. The transaction is confirmed, but the position size is unchanged. The screen should show the open order. Update the position once the venue reports a fill. That distinction should survive a reload or a dropped subscription.

Name the venue, market, account or subaccount, and supported order types in the acceptance criteria. A perpetual future gives exposure to an underlying price without a fixed expiration. Its order, position, and collateral can change independently over time. The tests below use illustrative fixtures, with expected results for a test environment or a replay.

Follow the order after confirmation

Track the submission signature and confirmation level, the venue's order or request identifier, and the resulting fills or position change as separate records. Check for a successful transaction alongside its confirmation status. A transaction can be confirmed with an execution error. Some venue instructions can place and fill in the same transaction, so the app should read the actual outcome before it chooses a label. Solana signature status · Velocity fill lifecycle

On Jupiter Perps, a PositionRequest account records a request to open or close a position. Ordinary requests close after execution or rejection. If the request account disappears, read the venue's execution history and the position to determine what happened. On a venue with an order book, an order can remain active after a partial fill. PositionRequest account at Jupiter · Velocity order types

  • Confirmed with no fill. In a resting-order fixture, the order placement succeeds with no execution. The order remains visible and the position size stays where it was. Reload the app and check both values again.
  • Partial fill followed by a cancellation. Start with no position. Where the venue supports partial fills, replay a four-unit fill against an illustrative ten-unit order. The app shows four filled and six open. Cancel the remainder, then verify that the history records four filled and six cancelled while the position reflects the completed fill. Replay the fill notification twice and check that the position stays at four units.
  • Timed-out send. Drop the submit response after broadcast. The app retains the original signature and checks it before offering a replacement. For a recent-blockhash transaction, test both a late success and a blockhash expiry with no recorded execution. The app should reconcile the original order before offering a new signature. Solana transaction confirmation and expiration

Test price data, margin, and funding separately

An oracle supplies an external reference price. The venue's mark, displayed quote, and executed price can differ. Freshness and confidence are inputs to venue-specific checks, and restrictions can differ by action. Use the market configuration that will ship with the app. Velocity oracle handling

  • Stale price data. Hold a last-known price in the client and replay a degraded oracle update. The app labels the price as stale and withdraws any action preview that depends on it. Account and order history remain readable. Test an action the venue refuses separately from any actions its rules still allow.
  • Healthy position with insufficient capacity for a new order. Supply a fixture that meets maintenance requirements and fails the initial margin check for an attempted increase. The app shows that the existing position is above maintenance and explains why the increase is unavailable. Then replay a state below maintenance and verify that the warning reflects the venue's liquidation rules. Velocity collateral and margin
  • Funding estimate and booked charge. Replay a funding estimate that changes, then the venue's confirmed funding update. The app identifies which values are estimates, specifies the rate period, and reconciles the posted amount separately from execution fees. Include a credit as well as a debit, and test that switching accounts cannot reuse a funding estimate from the previous account. Velocity funding rates

Hand support an order reference

Give someone outside the implementation team this ticket. "My close transaction confirmed, but I still see a position." From the reference, they should be able to find the venue and market, the account reference, the original signature, the open request or last fill, and the position as of the last verified slot. Have them explain the discrepancy and identify the next check. Record the test outcome and the person who owns the follow-up before accepting the integration.

For a proposal, ask for those test cases as written deliverables. Include the supported order types, the venue events each screen relies on, and who maintains the reconciliation when an RPC or indexer falls behind. Solana DeFi development at Builderz · Acceptance tests for Solana swaps

Continue reading

Building on Solana?

Book a 20-minute intro call, or send a short brief. We reply within one business day.

Solana development service