https://developers.coinbase.com/api/v2#complete-request-money
515101
def complete_request(self, account_id, request_id, **params):
        """"""
        response = self._post(
            'v2', 'accounts', account_id, 'transactions', request_id,
            'complete', data=params)
        return self._make_api_object(response, APIObject)
695062
function(query, callback) {
      return nano.request({ path: encodeURIComponent(db) + '/_find',
        method: 'post',
        body: query}, callback);
    }
1224855
function RefundTransaction($oID, $txnID, $amount = 'Full', $note = '', $curCode = 'USD') {
    if ($this->_mode == 'payflow') {
      $values['ORIGID'] = $txnID;
      $values['TENDER'] = 'C';
      $values['TRXTYPE'] = 'C';
      $values['AMT'] = number_format((float)$amount, 2);
      if ($note != '') $values['COMMENT2'] = $note;
    } elseif ($this->_mode == 'nvp') {
      $values['TRANSACTIONID'] = $txnID;
      if ($amount != 'Full' && (float)$amount > 0) {
        $values['REFUNDTYPE'] = 'Partial';
        $values['CURRENCYCODE'] = $curCode;
        $values['AMT'] = number_format((float)$amount, 2);
      } else {
        $values['REFUNDTYPE'] = 'Full';
      }
      if ($note != '') $values['NOTE'] = $note;
    }
    return $this->_request($values, 'RefundTransaction');
  }
823058
def repay_funding(self, amount, currency):
        
        params = {
            'amount': amount,
            'currency': currency  # example: USD
            }
        return self._send_message('post', '/funding/repay',
                                  data=json.dumps(params))
27830
def getbalance(self, **params):
        
        if not all([self.api_key, self.api_secret]):
            raise AuthException()

        endpoint = "/v1/me/getbalance"
        return self.request(endpoint, params=params)
565038
def receive_request(self, request):
        
        logger.debug("receive_request - " + str(request))
        try:
            host, port = request.source
        except AttributeError:
            return
        key_mid = str_append_hash(host, port, request.mid)
        key_token = str_append_hash(host, port, request.token)

        if key_mid in list(self._transactions.keys()):
            # Duplicated
            self._transactions[key_mid].request.duplicated = True
            transaction = self._transactions[key_mid]
        else:
            request.timestamp = time.time()
            transaction = Transaction(request=request, timestamp=request.timestamp)
            with transaction:
                self._transactions[key_mid] = transaction
                self._transactions_token[key_token] = transaction
        return transaction
1202065
private static MonetaryAmountsSingletonQuerySpi monetaryAmountsSingletonQuerySpi() {
        try {
            return Bootstrap.getService(MonetaryAmountsSingletonQuerySpi.class);
        } catch (Exception e) {
            Logger.getLogger(Monetary.class.getName()).log(Level.SEVERE, "Failed to load " +
                    "MonetaryAmountsSingletonQuerySpi, " +
                    "query functionality will not be " +
                    "available.", e);
            return null;
        }
    }
833292
def get_money(self):
        """"""
        response = self.session.get(self.mission_url, verify=False)
        soup = BeautifulSoup(response.text, 'html.parser')
        onclick = soup.find('input', class_='super normal button')['onclick']
        url = onclick.split('=', 1)[1][2:-2]

        if url == '/balance':
            return "You have completed the mission today."
        else:
            headers = {'Referer': 'https://www.v2ex.com/mission/daily'}
            data = {'once': url.split('=')[-1]}
            self.session.get('https://www.v2ex.com'+url, verify=False,
                             headers=headers, data=data)
            balance = self._get_balance()
            return balance
973623
def get_wallet_balance(wallet_name, api_key, omit_addresses=False, coin_symbol='btc'):
    '''
    
    '''
    assert is_valid_coin_symbol(coin_symbol)
    assert api_key
    assert len(wallet_name) <= 25, wallet_name
    assert isinstance(omit_addresses, bool), omit_addresses

    params = {'token': api_key}
    if omit_addresses:
        params['omitWalletAddresses'] = 'true'

    url = make_url(coin_symbol, 'addrs/{}/balance'.format(wallet_name))

    r = requests.get(url, params=params, verify=True, timeout=TIMEOUT_IN_SECONDS)
    return get_valid_json(r)
1182201
function createCoincap () {
  const socket = io(baseUrl, { autoConnect: false })

  const api = {}

  // Add JSON API supported endpoints
  ;[
    {
      method: 'coins',
      url: () => '/coins'
    },
    {
      method: 'map',
      url: () => '/map'
    },
    {
      method: 'front',
      url: () => '/front'
    },
    {
      method: 'global',
      url: () => '/global'
    },
    {
      method: 'coin',
      url: coin => `/page/${coin}`
    },
    {
      method: 'coinHistory',
      url: (coin, days) => `/history/${days ? `${days}day/` : ''}${coin}`
    }
  ].forEach(function ({ method, url }) {
    api[method] = (...args) => fetch(url(...args))
  })

  // Add Socket.IO methods
  ;[
    'open',
    'close',
    'on',
    'off'
  ].forEach(function (method) {
    api[method] = socket[method].bind(socket)
  })

  return api
}
512829
function sendMoney(config, moneyObj) {
  const defaultObj = {
    feeLevel: "ECONOMIC",
  };

  // Add default values to the moneyObj if they are not already assigned.
  Object.assign(moneyObj, defaultObj);

  const options = {
    method: "POST",
    uri: `${config.obServer}:${config.obPort}/wallet/spend`,
    json: true, // Automatically stringifies the body to JSON
    body: moneyObj,
    headers: {
      Authorization: config.apiCredentials,
    },
    // resolveWithFullResponse: true
  };

  return rp(options);
}
1128521
def accept
      @proxy_deposit_request.transfer!(params[:reset])
      current_user.can_receive_deposits_from << @proxy_deposit_request.sending_user if params[:sticky]
      redirect_to hyrax.transfers_path, notice: "Transfer complete"
    end
1345802
function create(callback, payee, amount, reference) {
  if(!util.isFunction(callback)) {
    throw new Error('callback must be a function');
  }

  var resource = this.coinjar.personal.api_endpoint + '/v1/payments.json',
    query = {
      payment : {}
    };

  if(payee) { query.payment.payee = payee; }
  if(amount) { query.payment.amount = amount; }
  if(reference) { query.payment.reference = reference; }

  request.post(resource)
    .auth(this.coinjar.personal.auth_token)
    .send(query)
    .end(function (response) {
      if(isResponseError(response, callback)) { return; }
      return callback(null, response.body.payment);
    });
}
776140
def transfer_funds(self, from_, to, amount):
        
        return self.make_api_request(
            'Account',
            'transferFunds',
            utils.get_kwargs(locals()),
            model=models.TransferResponse,
        )
142952
def withdraw(currency_code, address, amount, option = {})
            option["currency"] = currency_code
            option["address"] = address
            option["amount"] = amount
            json = post_ssl(@zaif_trade_url, "withdraw", option)
            return json
        end
423607
def _request_api(self, **kwargs):
        
        _url = kwargs.get('url')
        _method = kwargs.get('method', 'GET')
        _status = kwargs.get('status', 200)

        counter = 0
        if _method not in ['GET', 'POST']:
            raise ValueError('Method is not GET or POST')

        while True:
            try:
                res = REQ[_method](_url, cookies=self._cookie)
                if res.status_code == _status:
                    break
                else:
                    raise BadStatusException(res.content)
            except requests.exceptions.BaseHTTPError:
                if counter < self._retries:
                    counter += 1
                    continue
                raise MaxRetryError
        self._last_result = res
        return res
403613
def get_forwarding_address_details(destination_address, api_key, callback_url=None, coin_symbol='btc'):
    

    assert is_valid_coin_symbol(coin_symbol)
    assert api_key, 'api_key required'

    url = make_url(coin_symbol, 'payments')
    logger.info(url)

    params = {'token': api_key}
    data = {
            'destination': destination_address,
            }

    if callback_url:
        data['callback_url'] = callback_url

    r = requests.post(url, json=data, params=params, verify=True, timeout=TIMEOUT_IN_SECONDS)
    return get_valid_json(r)