Skip to content

A Swift package for connecting and trading on crypto exchanges such as Kucoin and Binance via REST πŸ€‘

License

Notifications You must be signed in to change notification settings

backslash-f/swift-trader

Repository files navigation

swift-version swift-package-manager platforms platforms build-status license

SwiftTrader πŸ€‘

A Swift package for connecting and trading on crypto exchanges such as Kucoin and Binance via REST. Additionally:

πŸ“– List of supported APIs

Kucoin Spot

Kucoin Spot Explanation API Documentation
SwiftTrader.kucoinSpotListAccounts Gets the list of accounts. list-accounts
SwiftTrader.kucoinSpotGetAccount Retrieves information for a single account. get-an-account
SwiftTrader.kucoinSpotGetTransferable Returns the transferable balance of a specified account. get-the-transferable
SwiftTrader.kucoinSpotPlaceStopLimitOrder Places a spot stop limit order. place-a-new-order
SwiftTrader.kucoinSpotOrderList Lists active Spot orders. list-orders
SwiftTrader.kucoinSpotStopOrderList Lists active Spot stop orders. list-stop-orders
SwiftTrader.kucoinSpotCancelStopOrders Cancels all untriggered stop orders of a given symbol (contract). cancel-orders
SwiftTrader.kucoinSpotWebSocketRequestPrivateToken Apply for a private token to create a WebSocket connection, subscribe to private topics, and receive private messages (e.g., account balance, open orders, etc.). apply-connect-token-private

Kucoin Spot HF

Kucoin Spot HF Explanation API Documentation
SwiftTrader.kucoinSpotHFPlaceMultipleLongLimitOrders(_:) Supports sequential batch long order placement from a single endpoint. A maximum of 5orders can be placed simultaneously. place-multiple-orders
SwiftTrader.kucoinSpotHFPlaceMultipleLongLimitOrders(_:) Supports sequential batch short order placement from a single endpoint. A maximum of 5orders can be placed simultaneously. place-multiple-orders

Kucoin Futures

Kucoin Futures Explanation API Documentation
SwiftTrader.kucoinFuturesAccountOverview Retrieves the overview of a Kucoin Futures account. account
SwiftTrader.kucoinFuturesStopOrderList Retrieves the list of un-triggered stop orders. get-untriggered-stop-order-list
SwiftTrader.kucoinFuturesOrderList Retrieves the list of active Futures orders. get-order-list
SwiftTrader.kucoinFuturesPlaceStopLimitOrder Places a Futures stop limit order. place-an-order
SwiftTrader.kucoinFuturesCancelStopOrders Cancels all untriggered Futures stop orders of a given symbol (contract). stop-order-mass-cancelation
SwiftTrader.kucoinFuturesPositionList Lists open Futures positions. get-position-list

Binance Spot

Binance Spot Explanation API Documentation
SwiftTrader.binanceSpotNewOrder Send in a new order. Currently, only MARKET orders are supported (but this can be easily changed). new-order-trade

Integration

Xcode

Use Xcode's built-in support for SPM.

or...

Package.swift

In your Package.swift, add SwiftTrader as a dependency:

dependencies: [
  .package(url: "https://github.com/backslash-f/swift-trader", from: "1.0.0")
]

Associate the dependency with your target:

targets: [
  .target(
    name: "YourAppName",
    dependencies: [
      .product(name: "SwiftTrader", package: "swift-trader")
    ]
  )
]

Run: swift build

About

A Swift package for connecting and trading on crypto exchanges such as Kucoin and Binance via REST πŸ€‘

Topics

Resources

License

Stars

Watchers

Forks

Languages