crypto

Send Money with the Coinbase Swift SDK


Photo by Thought Catalog / Unsplash

I recently added the ability to send money using the Coinbase Swift SDK that we're building alongside Quids.

When going through the OAuth flow you need to add the CoinbaseAPIClient.Scope.createTransactions to your list of scopes:

let authScopes: [CoinbaseAPIClient.Scope] = [
    .readAccounts,
    .readTransactions,
    .createTransactions(sendLimit: 500.0, currencyCode: "USD", period: .day)
]

Then once you have the required permission you will need to build a SendMoney request and pass that to your CoinbaseAPIClient:

let request = CoinbaseAPIClient.SendMoney(to: ethAddress, amount: 2.5, currencyCode: "ETH")

coinbase.send(money: request, from: accountID, twoFactorCode: nil) { (transaction, errors) in
    // ...
}

You'll notice this function can also take a 2FA code. If Coinbase returns a CoinbaseAPIClient.APIError.twoFactorRequired error, you should ask your user for a 2FA code and then re-call the send money function with the 2FA code.

Here is an example of how we're doing this in Quids:
Screen-Shot-2018-06-25-at-07.02.56

Cool Things - April Edition

The Subtle Art of Not Giving a F*ck

Brave Web Browser - A project to keep an eye on. It was reasonably stable on macOS but has recently crashed a lot, so I have moved back to Safari for now.

Revolut Business - Revolut added Freeagent sync. Once it supports unique IBAN numbers, rather than relying on a reference number, I'm all in.

Showerthoughts - a macOS screensaver I built.

Balance Manager (beta) - A web-based tool to help you manage your tokens.

Crypto Telegram Bot

All the Telegram crypto price tracker bots really suck, so I had a little play around with the bot API this evening and have managed to throw together something simple but useful (I think!)...

To use the bot either visit here or search for the user @CryptoPriceTrackerBot.

Then just type:

/[currency code] e.g. /xrp, /btc, /ltc

Thanks to KC for letting me use his face for the icon.