Depending on applicable regulations or business limitations, specific API requests may not be available for your use.

Security Transfer within an account

This request transfers securities from one folio to another folio, within the same account.

Request URL

Syntax PUT /restapi/accounts/{accountnumber}/folios/{folionumber}/securitytransfer
Example URL https://api.uat.foliofn.com/restapi/accounts/RA1234567C05/folios/RA1234567C03/securitytransfer

Request Data Fields – Rest Security Transfer

Field Required? Description Required Value
loginId String

A unique ID for the member which has been generated when the member is initially created.

Yes
fromFolio String

Securities should be transferred from the folio.

No. If null, uses the folio specified on the URL.
toFolio String

Folio securities should be transferred into.

Yes Should be different than fromFolio.
moveAll Boolean

Indicates if all securities should be transferred.

If “true” all securities defined in securitiesInfo will be flagged as moveAll.

No Choice between:
  • “true”
  • “false”
securitiesInfo SecuritiesInfo[]

The list of securities that should be transferred.

Yes See Rest Security Info

Request Data Fields – Rest Security Info

Field Type Description Required Value
ticker String The security identifier code. Yes
shares Double The number of shares to transfer. Only if moveAll is equal to false or not provided.
moveAll Boolean Indicates if all shares should be transferred. No Choice between:
  • “true”
  • “false”

Request Examples

Request Example for Transferring Some Securities


PUT http://api.uat.foliofn.com/restapi/accounts/RD8092700L/folios/RD8092700L03/securitytransfer HTTP/1.1
Content-Type: application/json

{
  "loginId" : "muserid90170",
  "fromFolio" : "RD8092700L03",
  "toFolio" : "RD8092700L04",
  "securitiesInfo" : [
  	{    "ticker" : "HELE", "shares" : "0.15"    }
  	{    "ticker" : "GE", "shares" : "0.5"    }
  	{    "ticker" : "ACE", "moveAll" : true    }
  ]
}

Request Example for Transferring All Securities


PUT http://api.uat.foliofn.com/restapi/accounts/RD8092700L/folios/RD8092700L03/securitytransfer HTTP/1.1
Content-Type: application/json

{
  "loginId" : "muserid90170",
  "fromFolio" : "RD8092700L03",
  "toFolio" : "RD8092700L04",
  "moveAll" : true,
  "securitiesInfo" : [
  	{    "ticker" : "HELE"}
  	{    "ticker" : "GE"}
  	{    "ticker" : "ACE"}
  ]
}

Response Example


HTTP/1.1 200 OK
Date: XXX
Location: restapi/accounts/RD8092700L/folios/RD8092700L03/securitytransfer
Content-Length: 0

Notes

The folionumber used in the request URL should be the folionumber that securities are being transferred from.

Error Codes

HTTP Code Status Field Code Message Description
403 - - - Specified user is not allowed to use the request.
400 loginId cannot.be.null - The loginId on the body request is null.
400 loginId loginId.not.found - The loginId on the body request is unknown.
400 loginId partnerCode.cannot.be.null - The partner code associated to the loginId is null.
400 loginId invalid.value - The loginId on the body request is not the account owner.
400 fromFolio invalid.value - The fromFolio value is different from the one specified on the URL request.
400 fromFolio cannot.be.equals.to.forbidden.folio - The fromFolio is a forbidden folio (end with “00” or “01”).
400 toFolio cannot.be.null - The toFolio on the body request is null.
400 toFolio cannot.be.empty - The toFolio on the body request is empty.
400 toFolio toFolio.cannot.be.closed - The toFolio on the body request is a closed folio.
400 toFolio cannot.be.equals.to.fromFolio - The toFolio on the body request is equals to fromFolio.
400 securitiesInfo cannot.be.null - The securitiesInfo on the body request is null.
400 securitiesInfo {i}.invalid.value - The securitiesInfo[i] has moveAll equals to true and shares greater than 0.
400 securitiesInfo {i}.ticker.cannot.be.null - The ticker on securitiesInfo[i] is null.
400 securitiesInfo {i}.ticker.not.found - The ticker on securitiesInfo[i] is unknown.
400 securitiesInfo {i}.security.not.found.in.fromFolio - The security on securitiesInfo[i] is not available in the fromFolio holdings list.
400 securitiesInfo {i}.shares.cannot.be.null - The shares on securitiesInfo[i] is null/0.0 (and moveAll equals to false).
400 folios.securityTransfer SystemException Unable to find folio. Unable to find the specified folio.
400 folios.securityTransfer 160 Unknown cost basis folio.
400 folios.securityTransfer 4008 The number of shares that you request to move must be whole number. The number of shares to move must be a whole number, greater than 0.0000000.
400 folios.securityTransfer 4009 You are trying to transfer more shares of a stock(s) than this folio holds. Not enough shares for move.
400 folios.securityTransfer 4066 Internal transfer overflow. The number of shares to move will result toFolio to exceed the configured maximum holding count.
400 folios.securityTransfer 4089 No shares specified to move. -
400 folios.securityTransfer 4181 Disallowed tickers for transfer to folio. -
400 folios.securityTransfer 4210 Only allow to move all securities. -
503 - - GPS service not available. The specified service is not available.

Change Log

05/11/2018

  1. Added new error codes:
    1. 400 - toFolio – toFolio.cannot.be.closed
    2. 400 - securitiesInfo – {i}.security.not.found.in.fromFolio

10/27/2017

  1. Added Notes Section
  2. Added Additional Request Examples

10/20/2015

  1. New error codes:
    1. 400 - fromFolio – cannot.be.equals.to.forbidden.folio
    2. 400 - toFolio – cannot.belong.to.different.account
    3. 400 - toFolio – cannot.be.equals.to.forbidden.folio
    4. 400 - securitiesInfo – {i}.share.cannot.be.fractional.for.02.folio
    5. 503 – Security Transfer service is not available today (invalid settlement date)

10/08/2015

  1. New documentation.

Getting Started

REST APIs

Resources

Developer Home