https://api.coinbase.com/v1/transactions/send_money
使用此 api 传递以下参数。
{
"transaction": {
"to": "user1@example.com",
"amount": "1.234",
"notes": "Sample transaction for you"
}
}
https://api.coinbase.com/v1/transactions/send_money
使用此 api 传递以下参数。
{
"transaction": {
"to": "user1@example.com",
"amount": "1.234",
"notes": "Sample transaction for you"
}
}
这是使用Coinbase iOS SDK的完整示例:
NSDictionary *transactionDict = @{
@"to": @"user1@example.com",
@"amount": @"1.234",
@"notes": @"sending money" };
NSDictionary *params = @{ @"transaction": transactionDict };
[apiClient doPost:@"transactions/send_money" params:transactionDict completion:^(id result, NSError *error) {
if (error) {
NSLog(@"Could not send money: %@", error);
} else {
NSLog(@"Success: %@", [result objectForKey:@"transaction"]);
}
}];
我得到了这个答案..
NSMutableDictionary *dic = [[NSMutableDictionary alloc]init];
[dic setObject:@"user1@example.com" forKey:@"to"];
[dic setObject:@"1.234" forKey:@"amount"];
[dic setObject:@"sending money" forKey:@"notes"];
NSMutableDictionary *dic1 = [NSMutableDictionary dictionaryWithObjectsAndKeys:dic,@"transaction", nil];