Latest 0.1.0
Homepage https://github.com/anthonypuppo/GDAXSwift
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0, watchos 2.0
Dependencies CryptoSwift
Authors

Version
License
Platform

Features

  • Lightweight, minimal codebase
  • Sandbox support
  • Automatic request signing when calling any of the private endpoints
  • All networking and JSON parsing handled internally
  • Request/response object models
  • Easy to handle, callback based response handling

While this library does the majority of the heavy lifting for you it is still recommended to read over the official GDAX documentation.

Requirements

  • iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 8.1+
  • Swift 3.0+

Installation

GDAXSwift is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "GDAXSwift"

Usage

Create an instance of GDAXClient using any of the available initializers. You may then use the public and private instance properties to access the public and private endpoints, respectivly.

Note that an error will be thrown if you attempt to access any of the private endpoints without supplying an API key, base64 encoded secret and passphrase.

let gdaxClient = GDAXClient(apiKey: "API key", secret64: "base64 encoded secret", passphrase: "passphrase", isSandbox: false)

// Multiple convenience initializers exist
// For example, if only querying public data on the live exchange, a new client may be constructed as GDAXClient()

// public (no authentication required)
gdaxClient.public.getProducts({ (products, response, error) in
    print("Response: (products as Any)")
    print("Error: (error as Any)")
})

// private (authentication required)
gdaxClient.private.getAccounts({ (accounts, response, error) in
    print("Response: (accounts as Any)")
    print("Error: (error as Any)")
})

TODO

  • Finish implementing all private endpoints
  • Support for the Websocket Feed
  • Documentation

Changelog

See the CHANGELOG file.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Author

Anthony Puppo, [email protected]

License

GDAXSwift is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "GDAXSwift",
    "version": "0.1.0",
    "summary": "The unofficial Swift wrapper around the GDAX API",
    "description": "The unofficial Swift wrapper around the GDAX API to allow easy programmatic trading and data querying",
    "homepage": "https://github.com/anthonypuppo/GDAXSwift",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Anthony Puppo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/anthonypuppo/GDAXSwift.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "source_files": "GDAXSwift/Classes/**/*",
    "dependencies": {
        "CryptoSwift": []
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This