@method @name cex#transfer @description transfer currency internally between wallets on the same account @see https://trade.cex.io/docs/#rest-private-api-calls-internal-transfer @param {string} code unified currency code @param {float} amount amount to transfer @param {string} fromAccount 'SPOT', 'F
(Object code, Object amount, Object fromAccount2, Object toAccount2, Object... optionalArgs)
| 1861 | * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/?id=transfer-structure} |
| 1862 | */ |
| 1863 | public java.util.concurrent.CompletableFuture<Object> transfer(Object code, Object amount, Object fromAccount2, Object toAccount2, Object... optionalArgs) |
| 1864 | { |
| 1865 | final Object fromAccount3 = fromAccount2; |
| 1866 | final Object toAccount3 = toAccount2; |
| 1867 | return java.util.concurrent.CompletableFuture.supplyAsync(() -> { |
| 1868 | Object fromAccount = fromAccount3; |
| 1869 | Object toAccount = toAccount3; |
| 1870 | Object parameters = Helpers.getArg(optionalArgs, 0, new java.util.HashMap<String, Object>() {{}}); |
| 1871 | Object transfer = null; |
| 1872 | if (Helpers.isTrue(Helpers.isTrue(!Helpers.isEqual(toAccount, "")) && Helpers.isTrue(!Helpers.isEqual(fromAccount, "")))) |
| 1873 | { |
| 1874 | transfer = (this.transferBetweenSubAccounts(code, amount, fromAccount, toAccount, parameters)).join(); |
| 1875 | } else |
| 1876 | { |
| 1877 | transfer = (this.transferBetweenMainAndSubAccount(code, amount, fromAccount, toAccount, parameters)).join(); |
| 1878 | } |
| 1879 | Object fillResponseFromRequest = this.handleOption("transfer", "fillResponseFromRequest", true); |
| 1880 | if (Helpers.isTrue(fillResponseFromRequest)) |
| 1881 | { |
| 1882 | Helpers.addElementToObject(transfer, "fromAccount", fromAccount); |
| 1883 | Helpers.addElementToObject(transfer, "toAccount", toAccount); |
| 1884 | } |
| 1885 | return transfer; |
| 1886 | }); |
| 1887 | |
| 1888 | } |
| 1889 | |
| 1890 | public java.util.concurrent.CompletableFuture<Object> transferBetweenMainAndSubAccount(Object code, Object amount, Object fromAccount2, Object toAccount, Object... optionalArgs) |
| 1891 | { |
nothing calls this directly
no test coverage detected