Futures Trading in Mobile Exchange App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Futures Trading in Mobile Exchange App
Complex
from 2 weeks to 3 months
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing Futures Trading in a Mobile Exchange App

Futures trading on crypto exchanges means perpetual contracts with no expiration, leverage up to 125x, and an 8-hour funding mechanism. Unlike spot trading, there's no real asset — just a price difference contract. This demands fundamentally different UI requirements: Mark Price, Funding Rate, Liquidation Price, Unrealized/Realized PnL, and margin mode — all updating in real-time.

Perpetual Futures: Key Concepts for UI

Mark Price — index price calculated by the exchange from weighted-average price across multiple spot exchanges + funding premium. P&L and liquidation use Mark Price, not Last Price. The difference can reach 0.5–2% during high volatility. Always show both values.

Funding Rate — rate that longs pay shorts (or vice versa) every 8 hours. At high deviation: 0.1% every 8 hours = ~0.3% daily from position. Show Funding Rate and time until next accrual in the position card.

Leverage on futures dynamically changes via slider or field. Maximum depends on position size: on Binance, 125x is available only for positions under $50,000; above that, lower max.

Liquidation Price: Calculation for Futures

Formula for USDM perpetual (Binance Futures), LONG position:

LiquidationPrice = EntryPrice × (1 - InitialMarginRate + MaintenanceMarginRate)

where InitialMarginRate = 1 / Leverage.

// Android — liquidation price for perpetual futures LONG
fun calcLiqPriceLong(
    entryPrice: BigDecimal,
    leverage: Int,
    mmRate: BigDecimal = BigDecimal("0.005") // Maintenance Margin Rate
): BigDecimal {
    val imr = BigDecimal.ONE.divide(BigDecimal(leverage), 8, RoundingMode.HALF_UP)
    return entryPrice.multiply(BigDecimal.ONE.subtract(imr).add(mmRate))
        .setScale(2, RoundingMode.HALF_UP)
}

For positions with multiple averages (adding to position), recalculate Entry Price via weighted average and update Liquidation Price. For Cross Margin, the entire available balance factors into the calculation — more complex formula.

Trading Screen UI

Futures trading screen is data-heavy by nature. Recommended structure for mobile:

Top: Mark Price (large) | Last Price | Funding Rate + Countdown | 24h Change

Center: Candlestick chart (TradingView Lightweight Charts in WKWebView / WebView) with timeframe toggle

Bottom: Tabs "Position" / "Open Orders" / "History" + order form

Order form — Bottom Sheet with Long/Short tabs. Fields: Leverage (slider), Price (for limit), Size (in contracts or USDT), margin mode Cross/Isolated.

TP/SL Attached to Position

In futures, Take Profit and Stop Loss aren't separate orders — they're position attributes. Binance Futures API: POST /fapi/v1/order with reduceOnly=true, or create TP/SL via POST /fapi/v1/order with closePosition=true.

// iOS — creating TP/SL for futures position
struct FuturesTpSlRequest: Codable {
    let symbol: String
    let side: String          // opposite of current position
    let type: String          // TAKE_PROFIT_MARKET or STOP_MARKET
    let stopPrice: String
    let closePosition: String // "true"
    let workingType: String   // MARK_PRICE or CONTRACT_PRICE
    let timeInForce: String   // GTE_GTC
}

workingType: MARK_PRICE — TP/SL triggers on Mark Price, protecting from false triggers on anomalous Last Price (wick hunting). Explain this to users in a tooltip.

Real-Time PnL and Liquidation

Binance Futures WebSocket: @markPrice stream for Mark Price, userData stream with ORDER_TRADE_UPDATE and ACCOUNT_UPDATE for balances and positions. All position UI relies on these two streams.

When approaching liquidation (Margin Ratio > 80%): visual pulse (position card border animation), high-priority push. On actual liquidation — separate screen with summary: what was, close price, loss amount.

Timeline

MVP futures module (perpetual, Long/Short, TP/SL):

Component Timeline
WebSocket Mark Price + Funding Rate 3 days
Order form with leverage and margin mode 1 week
Real-time positions: PnL, Liquidation Price 1 week
TP/SL attached to position 3 days
Trade history and funding payouts 3 days
Risk push alerts 3 days

Total: 4–6 weeks. Full module with Multi-asset Mode, Portfolio Margin, hedge mode — 3 months.