iOS SDK Changelog

4.1.1 (2024-11-06)

Features

  • Added bottom spacing for DM web view such that the iOS home indicator has some space and it does not overlap with the tab bar items inside the web view.

4.1.0 (2024-10-10)

Features

  • 5paisa account opening - native PWA integration removed

    For users to complete the account opening application, earlier versions users could proceed within the
    partner app. Now, Account opening with 5paisa will take place in the installed browser outside the app.

Intents Impacted: 5paisa leadgen flow.

4.0.1 (2024-08-12)

Features

  • Added broker field inside user_cancelled and market_closed error response in guest flow.

Intents Impacted: TRANSACTION

4.0.0 (2024-07-12)

❗️

BREAKING CHANGE

Mixpanel upgraded to version 4.2.7.

Added .mfTransaction intent for generic MF Transaction responses. This allows us to update the response data from our backend without having to release a new version of the SDK.

Features

  • MF Transaction responses are now resolved in a separate .mfTransaction intent which has a data: String property. The data is a valid JSON string and can be decoded on the consumer's end for the transaction response

Intents Impacted: MF Transactions.

3.11.1 (2023-12-05)

Bug Fixes

  • Fixed an issue where cancelling AuthenticationSession popup on logout does not close the sc-loader
  • Fixed an issue where Holdings Import was failing with internal_error:2000 due to incorrect INTENT_HOLDINGS_IMPORT constant value

Intents Impacted: All transactional intents & Logout.

3.10.2 (2023-09-11)

Features

  • Added a new error on the sdk - order_pending:4006. This error is thrown when an order is placed at the broker but takes longer than usual to execute.
    Order types affected:
    • Invest or Invest + SIP SMT
    • SST BUY/SELL
    • Exit SMT
    • Archive/Repair SMT

Intents Impacted: TRANSACTION

3.9.4 (2022-02-03)

Bug Fixes

  • Fixed an issue where the SDK would throw market_closed 4004 error for Dummy Order flow.

Intents Impacted: All transactional intents.

3.8.3 (2022-12-01)

Bug Fixes

  • Fixed an issue preventing smallplug UI from rendering correctly on iOS version 13 and below.
  • Fixed an issue causing build failures for Xcode 14.x.
  • Fixed an issue causing build failures when Mixpanel-swift is added as a dependency.

Intents Impacted: All transactional intents and smallplug.

3.8.2 (2022-11-25)

Bug Fixes

  • Added source key in OrderData.

3.8.1 (2022-11-25)

Bug Fixes

  • Added missing keys in OrderBatch - dummy & transactionId.

3.7.2 (2022-10-21)

Features

  • Added support for objc for MF Holdings Import
  • Added notes key in the success response of triggerMfTransaction and triggerTransactionFlow.

Intents Impacted: All transactional intents.

3.7.1 (2022-10-19)

Bug Fixes

  • Fixed an issue causing a build failure on Xcode 14.

Intents Impacted: NA

3.7.0 (2022-09-28)

Features

  • Mutual Funds Holdings Import: Added a feature enabling users to import a snapshot of their Mutual Funds Holdings natively in a seamless manner.

Syntax

/**
* Trigger Mutual Funds Transaction Method
*/
func triggerMfTransaction(
  presentingController: UIViewController, //the current View Controller
  transactionId: String, //transactionId for intent=MF_HOLDINGS_IMPORT
  completion: @escaping(Result<TransactionIntent, TransactionError>) -> Void
)
  • Added compatibility for Xcode 14 (Swift version 5.7)

🚧

Note

Starting with this version, gateway iOS SDK won't be compatible with Xcode 13.x (Swift 5.6) or before.

Bug Fixes

  • Removed the annotation @available for stored properties in classes.

3.6.0 (2022-09-20)

Features

  • The SDK will now show a login here cta on the account opening page if requested by the host. On click of this cta the host would receive a login action post which the host can trigger a broker login transaction.
296

Landing Page

Syntax

@objc public func triggerLeadGen(
        presentingController: UIViewController, //current viewController
        params:Dictionary<String,String>?, // user params, example: $name, $phone_number 
        showLoginCta: Bool, // if set to true, would display the login here cta 
        completion: @escaping(String?) -> Void
)

If the user clicks on login here, the SDK will share a JSON response with an action key to notify the same to the host:

{
    leadId: null, 
    status: "INITIALIZED",
    action: "login"  // Indicates Login CTA click. Key won't be present if no action required
}

Dev Improvements

  • Refactored framework script to remove architectures only for release mode

Intents Impacted: Lead Gen (Non-transactional intents)

3.5.3 (2022-08-02)

Bug Fixes

  • Removed arm64 architecture from DEBUG build configuration for iOS simulators.

Intents Impacted: NA

3.5.2 (2022-08-01)

Bug Fixes

  • Fixed an issue which caused the SDK to return an error response for a successful SMT transaction.

Intents Impacted: TRANSACTION (SMT)

3.5.1 (2022-07-29)

Bug Fixes

  • Fixed an issue which prevented SDK to share smallcaseAuthToken and broker values for consent_denied 1003 and transaction_expired 1005 error .
  • Fixed an issue which caused the SDK to crash for webhook_unreachable 3003 error.
  • Fixed an issue which prevented the SDK to share smallcase_archived 1013 error.
  • Fixed an issue which prevented the SDK to mark a SMT transaction errored even if the conditions were met.
  • Fixed an issue which prevented the SDK from returning the expected error response when a user cancels a transaction just before the transaction timer ends on BP.

Intents Impacted: All Transactional intents

3.5.0 (2022-07-25)

Features

  • The SDK will now share smallcaseAuthToken and broker values in addition to the error message and code for users performing a successful broker login but not completing the intended transaction successfully. This data can be fetched from error.data

Syntax

{
   "data":{
      "broker":"kite-leprechaun",
      "smallcaseAuthToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFsbGNhc2VBdXRoSWQiOiI2MmVhMzkyODRlZmY1YmM4NjYwYWU0YzYiLCJpYXQiOjE2NTk1MTcyMDYsImV4cCI6MTY1OTUyMDgwNn0.qgYiZCxZxFrlcGgtvKmUqSaTpIyk4H2Mt2XWGfAYXqg"
   },
   "code":1012,
   "message":"user_cancelled"
}

Bug Fixes

  • Fixed an issue which caused no error data shared for market_closed 4005 and intent_not_enabled_for_broker 3000 errors.
  • Fixed an issue which caused the SDK to not share a transactionId post a successful CONNECT transaction
  • Fixed an issue which caused the SDK to use the overriden value of CFBundleVersionString while deploying an app to the App Store.
  • Removed the default smallcase logo from smallplug header, SDK displays only the back (left) icon if a gateway's smallplug header icon is not available.

Dev improvements

  • Added CI release scripts in package.json to streamline the SDK release process
  • Removed redundant method to fetch the SDK version from info.plist file

Intents Impacted: All Transactional intents

3.4.4 (2022-07-19)

Bug Fixes

  • Fixed an issue causing the SDK to crash due to unavailability of mixpanel library

Intents Impacted: All Transactional intents

3.4.3 (2022-06-18)

Bug Fixes

  • Fixed an issue where user was unable to authenticate for 5paisa account opening journey.

Intents Impacted: Lead Gen (Non-transactional Intent)

3.4.2 (2022-06-18)

Bug Fixes

  • Fixed an issue which caused Mixpanel to initialise for non-whitelisted gateways.

Intents Impacted: All Transactional intents

3.4.1 (2022-06-17)

Bug Fixes

  • Fixed an issue causing iscid to be incorrectly encoded in the url for the method getUserInvestmentDetails(iscid: String).

Intents Impacted: TRANSACTION (SMT)

3.4.0 (2022-06-17)

Features

  • Added partner branding to smallplug. With this new experience your app logos will be very accessible and prominent on all the screens inside smallplug.

  • Syntax:

func launchSmallPlug(presentingController: UIViewController,
                     smallplugData: SmallplugData?,
                     smallplugUiConfig: SmallplugUiConfig?,
                     completion: @escaping ((Any?, Error?) -> Void))

// SmallplugUiConfig
class SmallplugUiConfig: NSObject { 
  	// headerColor: This is the string HEX value of the color. eg: "000000"
		public var headerColor: String?
		
  	// backIconColor: This is the string HEX value of the color. eg: "FFFFFF"
    public var backIconColor: String?
    
  	// opacity: 0 <= value <=1, value should be between 0 and 1. This is the opacity for the header.
    public var opacity: CGFloat?
  
  	// backIconColorOpacity: 0 <= value <=1, value should be between 0 and 1.
    public var backIconColorOpacity: CGFloat?
}

The refactored smallplug window:

1242

smallcase Distribution Module: custom branding screenshot (on iOS)

Bug Fixes

  • Fixed an exception which caused Mixpanel to register events in the absence of the Mixpanel API key.
  • Fixed an issue which returned market_closed 4004 error for CONNECT transaction

Intents Impacted: All Transactional intents and DM

3.3.0 (2022-06-10)

Features

  • Integrated Mixpanel SDK to track user events.

Intents Impacted: All Transactional intents

3.2.4 (2022-05-30)

Bug Fixes

  • Excluded arm64 architecture from ios simulator target.
  • Fixed an issue which caused Lead Gen to not return any response with 5paisa broker.

Intents Impacted: All Transactional and Non-Transactional intents

3.2.0 (2022-05-24)

Bug Fixes

  • Fixed an issue which caused Show Orders feature to throw intent_not_enabled_for_broker 3000 error for connected leprechaun users.

Intents Impacted: SHOW_ORDERS (Non Transactional Intent).

3.1.21 (2022-04-22)

Bug Fixes

  • Fixed an issue which caused login for iframe brokers to fail on STAG.

Intents Impacted: All Transactional Intents.

3.1.20 (2022-04-12)

Bug Fixes

  • Fixed an issue which caused smallplug to crash while launching an URL with HTTP scheme and about:blank page.

Intents Impacted: SMT

3.1.19 (2022-04-06)

Dev improvements

  • Added a method to expose sdk version to the host module (internal-tracking).

Intents Impacted: NA

3.1.18 (2022-03-23)

Dev improvements

  • Compiled the framework with Xcode 13 (Swift 5.5) along with library evolution.

Intents Impacted: NA

3.1.17 (2022-03-18)

Dev improvements

  • Enabled Library evolution for Xcode 13 .

Intents Impacted: NA

3.1.16 (2022-03-17)

Bug Fixes

  • Fixed an issue which caused iframe brokers like HDFC Securities and AXIS Direct to launch their investments page on show orders URL .

Intents Impacted: Show orders

3.1.15 (2022-03-15)

Bug Fixes

  • Fixed an issue which caused the copy on pre-broker-chooser screen to display the contents of a guest user flow event for a connected user.

Intents Impacted: All Transactional Intents.

3.1.14 (2022-03-14)

Bug Fixes

  • Fixed an issue which caused broker chooser to show only 1 broker when navigated from an intent with single available broker to an intent with available brokers > 1.

Intents Impacted: All Transactional Intents.

3.1.13 (2022-03-03)

Dev improvements

  • Refactored mobile SDK version sent to gateway api.

Intents Impacted: NA.

3.1.12 (2022-02-23)

Bug Fixes

  • Fixed an issue which caused broker chooser to show only 2 brokers when navigated from show_orders to transactional flow
  • Lead Gen status response from 5paisa PWA screen and broker redirection screen.

Intents Impacted: All Transactional Intents.

3.1.11 (2022-02-09)

Features

  • Added SHOW_ORDERS non transactional intent.

Intents Impacted: NA.

3.1.10 (2022-02-04)

Features

  • Added SMT AMO cancellation

Intents Impacted: TRANSACTION.

3.1.9 (2021-12-12)

Bug Fixes

  • Added objc for using smallcase module.
  • Removed redundant orderConfig while communicating with broker chooser.

Intents Impacted: CONNECT, TRANSACTION.

3.1.6 (2021-12-02)

Dev Improvements

  • Added support for Xcode 13

Intents Impacted: NA

3.1.5 (2021-11-16)

Bug Fixes

smallcase distribution
  • Fixed an issue which caused error while submitting lead gen status response to smallcase distribution.
  • Fixed a race condition between SDK initialisation from smallcase distribution and successful CONNECT transaction.
  • Fixed an issue causing smallcase SIP order to fail after successful smallcase BUY order.
  • Fixed an issue which resulted in no lead data while launching broker's account opening page in the browser.
  • Fixed an issue preventing new SFSafariViewController to launch with javascript's window.open method.

Intents Impacted: CONNECT, TRANSACTION.

3.1.2 (2021-10-28)

Features

smallcase distribution
  • External links inside Distribution Module are now opened in SafariViewController.
  • PDF files from Distribution Module can now be viewed separately in SafariViewController.

Bug Fixes

  • Fixed Lead Gen flow initialisation from smallcase distribution.
  • Fixed external link opening via javascript.

Intents Impacted: NA

3.0.9 (2021-09-24)

Features

  • Added SUBSCRIPTION transaction intent enabling smallcase subscription via Gateway SDK.

  • Added Distribution Module to enable transactions without requiring a transactionId from the consumer. The consumer can launch the distribution module with a custom header text and a custom route along with any parameters.

  • Syntax:

func launchSmallPlug(presentingController: UIViewController,
                     smallplugData: SmallplugData?,
                     completion: @escaping ((Any?, Error?) -> Void))

//SmallplugData
class SmallplugData: NSObject {   
		var targetEndpoint: String?
    var params: String?
}

Intents Impacted: SUBSCRIPTION.

3.0.4 (2021-08-24)

Features

  • Added Lead Id and Lead Status in LeadGen response. SDK will now send the leadId and status of the application in response to triggerLeadGen method invocation

  • Syntax:

@objc public func triggerLeadGen(presentingController: UIViewController,params:Dictionary<String,String>?, completion: @escaping(String?) -> Void){ 
// Consume leadId and status from json response 
}

Sample LeadGen response:

{
   "leadId":"600988900ccc05c1398f59df",
   "status":"PROCESSING"
}

📘

Note

This is not a breaking change. The developers can continue with the existing implementation of triggerLeadGen method.

Bug Fixes

  • Fixed an issue which caused the Gateway SDK to return with no_broker 1008 code while passing an incorrect broker name during SDK initialisation.

Intents Impacted : All Transaction Intents.

3.0.2 (2021-08-13)

Features

  • Added broker name in Transaction responses.

Dev improvements

  • Refactored CONNECT Transaction response to a JSON string.
    Sample response for a new user on smallcase ecosystem
{
  "signup":true,
  "smallcaseAuthToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFsbGNhc2VBdXRoSWQiOiI2MTFhMDMxYzAzMzY0YzgyNDdhYTVlNDgiLCJpYXQiOjE2MjkxMTA2MjAsImV4cCI6MTYyOTExNDIyMH0.c8CP9zjL9gKIFC1sTECaVpUTfmwrg0aTi1x89GXii5Q",
  "broker":"kite-leprechaun"
}

📘

Note

The signup key signifies whether a user is new to smallcase-ecosystem or not and it would only be visible to first-party gateway.

Bug Fixes

  • Fixed an issue which caused gateway sdk to return with no_broker 1008 code while passing an empty broker list in triggerTransaction method (obj-c).

Intents Impacted : CONNECT, TRANSACTION, HOLDINGS_IMPORT, AUTHORISE_HOLDINGS, FETCH_FUNDS, SIP_SETUP

3.0.0 (2021-07-23)

Dev improvements

  • Reduced minimum iOS deployment target to 11.0.
  • Migrated podspec file to github.

🚧

Podfile changes

The source value in the Podfile needs to be updated to : https://github.com/smallcase/cocoapodspecs.git for receiving further updates to gateway iOS sdk.

Bug Fixes

  • Fixed an issue due to which basket name and image on broker chooser were not inflated (obj-c).
  • Fixed an issue that caused a race condition while triggering a transaction subsequently while initialising the sdk.
  • Fixed the issue of market_closed 4004 error while placing an order of type rebalance.

Intents Impacted : CONNECT, TRANSACTION, HOLDINGS IMPORT

2.9.3 (2021-05-28)

Bug Fixes

  • Fixed an issue that caused Xcode 12 to build arm64 architecture for x86_64 iphone simulator, thereby failing to build with a non-zero exit code.

  • Intents Impacted: NA

2.9.2 (2021-05-26)

Dev improvements

  • Added objective-c compatible methods for refactored SIP_SETUP response and for the LEAD GEN flow with UTM params.

  • Syntax:

@objc public func triggerLeadGen(
  presentingController: UIViewController,
  params:Dictionary<String,String>?,
  utmParams: Dictionary<String, String>?)
  • Intents Impacted: SMT

2.9.1 (2021-05-24)

Dev improvements

  • Save UTMs and isRetargeted meta in Lead Gen
    For marketing channel attribution, smallcase app wants to save some attribution data in addition to the source that we already save
    . This is on /gateway-signup route only
    . We will now save addition field ‘utm’ in meta field of UserApplications document
    . It can contain five keys - source, medium, campaign, term, content
    . Gateway is now sending retargeting emails to dropped off users. We want to track the conversion rate of the same
    *. We will now save additional field ‘isRetargeted’ inside the meta field

  • Syntax:

func triggerLeadGen(presentingController: UIViewController,params:Dictionary<String,String>?, utmParams: Dictionary<String, String>?, retargeting: Bool?)
  • Intents Impacted: NA

2.9.0 (2021-05-11)

Features

  • Broker Chooser Redesigned
    We have now redesigned the look and feel of the broker chooser on gateway. Rather than 9 brokers + dropdown setup, we will now show brokers in the swipeable grid

  • Swipeable grid: users will now be able to see 8 brokers in the first fold, and a ‘more brokers’ button. Clicking the more button will show the remaining brokers in the next fold. On touch devices, users can swipe over the grid to move back and forth.

  • How does this work card: we will now show the user how the user journey looks like. For this, we have a different UI for the first time and returning users
    First Time User: Expanded card above broker grid
    Returning User: Collapsed card above broker grid

  • Broker order on the grid based on recency of selection : We will now start to store recent brokers per transaction intents in partner app’s local storage. The broker will be ordered in the broker grid based on the recency of selection

  • Broker Consent block: Axis consent block will now be displayed on top of the broker grid when Axis is selected. Users can navigate back to the grid with the back button.

    Intents Impacted : CONNECT, TRANSACTION, HOLDINGS IMPORT

  • Basket name and image configuration on order popup & broker chooser for stock transactions
    This feature provides an option to the client to pass their custom Basket name and logo/image if any while placing an intent of type TRANSACTION. The order name and order logo will appear on the broker chooser popup & order popup. For this the client needs to pass the following meta object in the orderConfig while creating a transactionId

    Intents Impacted : TRANSACTION { type: SECURITIES }
    \

Sample curl below

curl --location --request POST 'https://gatewayapi.stag.smallcase.com/gateway/gatewaydemo/transaction' \
--header 'Content-Type: application/json' \
--header 'x-gateway-secret: gatewayDemo_secret' \
--header 'x-gateway-authtoken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJndWVzdCI6InRydWUiLCJpYXQiOjE2MDI1NzAxOTR9.z8XSJbfipFbvpCzdhyKmvf708rUPXp6AJ9VEyPRVdZc' \
--data-raw '{
    "intent": "TRANSACTION",
    "orderConfig": {
        "type": "SECURITIES",
        "meta": {
            "orderName": "Rockstar Portfolio",
            "orderLogo": "https://avatars.dicebear.com/api/bottts/brrr.png"
        },
        "securities": [
            {
                "ticker": "INFY",
                "quantity": 10,
                "type": "BUY"
            },
            {
                "ticker": "TCS",
                "quantity": 10,
                "type": "BUY"
            }
        ]
    }
}'

Result:

Bug Fixes

  • Removed Order In Queue Screen
    For SST orders, if an order takes more than 30 seconds to get executed, that order is queued for execution with the broker and the user also receives acknowledgement via a popup.

    Intents Impacted : SST

  • Fixed Broker logout issue:

While logging out the user from the broker, the smallcase session on the browser is terminated, however the user remains a connected user with his broker data available with gateway. The user may or may not be logged out from the host app session. Hence, if the same user after logging out tries to place an order using gateway sdk, he should be redirected to the login screen of the broker from which he logged out. This has been fixed on gateway sdk android.

Intents Impacted : SST, SMT, HOLDINGS IMPORT.

  • broker chooser animation and content fixes
    Fixed transparent background behind the broker-chooser and exit animation of the broker-chooser screen.

  • Broker Chooser blank page for brokers < 9
    Fixed an issue which caused an empty page while in broker-chooser grid.

2.8.1 (2021-03-30)

Features

  • 5paisa account opening - native PWA integration
    For users to complete the account opening application, earlier versions users were redirected to the installed browser outside the app. Now, Account opening with 5paisa will take place within the partner app via progresive web app.

Internal Fixes and Optimisations around partner identification and sdk versions

  • lead gen query param gateway changed to gatewayName
    For the endpoint https://www.smallcase.com/gateway-signup the query parameter gateway was sending the gateway distributor name, this has been changed to the gateway name (eg: moneycontrol)

  • removed hardcoded version query param
    Removed hardcoded value for the query param “v” for the endpoint https://www.smallcase.com/gateway-signup with the current build version of the gateway sdk. The version parameter is used to identify the url for 5paisa account opening journey.

2.7.2 (2021-03-19)

Dev Improvements

  • Consistent transaction response for stock & smallcase transactions
    Earlier transactionId was returned under the key batches of a SST order response, In case of SMT order transactionId was not returned under the same key in response. This issue has been fixed and the transactionId is now returned as a part of the success response in the TransactionResponseListener along with the data and the smallcaseAuthToken. For SST transaction, the transactionId will also be returned under the batches key as done earlier.

    Intents Impacted: TRANSACTION, HOLDINGS IMPORT.

    Sample response - Stock orders

transaction(
  smallcaseAuthToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFsbGNhc2VBdXRoSWQiOiI2MDViNTM3YzY2YzU0NzM5NTc1MWFiYTgiLCJpYXQiOjE2MjA3MzI0MDYsImV4cCI6MTYyMDczNjAwNn0.RohiAy0u1_-PwP2kkvU-yrWvbjI8Fr8k0O1LWoaxW3s",
  transactionData: SCGateway.Transaction.SuccessData(
    data: Optional(SCGateway.OrderData(
      batches: Optional([SCGateway.OrderBatch(
        filled: Optional(1),
        variety: Optional("regular"),
        buyAmount: Optional(8.0),
        sellAmount: Optional(0.0),
        orders: Optional([SCGateway.Order(
          orderType: Optional("MARKET"),
          product: Optional("CNC"),
          exchange: Optional("NSE"),
          status: Optional("COMPLETE"), 
          quantity: Optional(1),
          tradingsymbol: Optional("IDEA"),
          transactionType: Optional("BUY"),
          filledQuantity: Optional(1),
          averagePrice: Optional(8.0),
          exchangeOrderId: Optional("605b529ff07c524a47323bbf609a69f0bba5579c78d96771"))]),
        unplaced: Optional([]),
        batchId: Optional("609a69f03fc37abc9e94761d"), 
        quantity: Optional(1),
        status: "COMPLETED",
        completedDate: Optional("2021-05-11T11:26:43.614Z"),
        label: nil,
        originalLabel: nil)]),
      funds: nil,
      sipDetails: nil,
      name: nil,
      scid: nil,
      iscid: nil,
      imageUrl: nil)),
    smallcaseAuthToken: Optional("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFsbGNhc2VBdXRoSWQiOiI2MDViNTM3YzY2YzU0NzM5NTc1MWFiYTgiLCJpYXQiOjE2MjA3MzI0MDYsImV4cCI6MTYyMDczNjAwNn0.RohiAy0u1_-PwP2kkvU-yrWvbjI8Fr8k0O1LWoaxW3s"),
    signup: nil,
    transactionId: Optional("TRX_9fd1cdc4da5249a0be24863ef9aca4ec")))

Sample response - smallcase BUY order

transaction(
  smallcaseAuthToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFsbGNhc2VBdXRoSWQiOiI2MDViNTM3YzY2YzU0NzM5NTc1MWFiYTgiLCJpYXQiOjE2MjA3MzI1NDMsImV4cCI6MTYyMDczNjE0M30.mvUsgeN6rUS55P3wFF0oWM5dClokabJPDAjMrSaZJxY",
  transactionData: SCGateway.Transaction.SuccessData(
    data: Optional(SCGateway.OrderData(
      batches: Optional([SCGateway.OrderBatch(
        filled: Optional(4),
        variety: Optional("regular"),
        buyAmount: Optional(701.02),
        sellAmount: Optional(0.0),
        orders: Optional([SCGateway.Order(
          orderType: Optional("MARKET"),
          product: Optional("CNC"),
          exchange: Optional("NSE"),
          status: Optional("COMPLETE"),
          quantity: Optional(1),
          tradingsymbol: Optional("ICICINIFTY"),
          transactionType: Optional("BUY"),
          filledQuantity: Optional(1),
          averagePrice: Optional(157.0),
          exchangeOrderId: nil),
                        SCGateway.Order(
                          orderType: Optional("MARKET"),
                          product: Optional("CNC"),
                          exchange: Optional("NSE"),
                          status: Optional("COMPLETE"),
                          quantity: Optional(4),
                          tradingsymbol: Optional("ICICINXT50"),
                          transactionType: Optional("BUY"),
                          filledQuantity: Optional(4),
                          averagePrice: Optional(36.0),
                          exchangeOrderId: nil),
                          SCGateway.Order(
                            orderType: Optional("MARKET"),
                            product: Optional("CNC"),
                            exchange: Optional("NSE"),
                            status: Optional("COMPLETE"),
                            quantity: Optional(2),
                            tradingsymbol: Optional("ICICILOVOL"),
                            transactionType: Optional("BUY"),
                            filledQuantity: Optional(2),
                            averagePrice: Optional(121.01),
                            exchangeOrderId: nil),
                          SCGateway.Order(
                            orderType: Optional("MARKET"),
                            product: Optional("CNC"),
                            exchange: Optional("NSE"),
                            status: Optional("COMPLETE"),
                            quantity: Optional(2),
                            tradingsymbol: Optional("ICICINV20"),
                            transactionType: Optional("BUY"),
                            filledQuantity: Optional(2),
                            averagePrice: Optional(79.0),
                            exchangeOrderId: nil)]),
        unplaced: Optional([]),
        batchId: Optional("609a6a72db079a0101db99e4"),
        quantity: Optional(4),
        status: "COMPLETED",
        completedDate: Optional("2021-05-11T11:28:53.444Z"),
        label: Optional("BUY"), originalLabel: Optional("BUY"))]), 
      funds: nil,
      sipDetails: nil,
      name: Optional("ICICI Prudential Leaders"),
      scid: Optional("ICIET_0002"),
      iscid: Optional("609a6a72db079a0101db99e2"),
      imageUrl: Optional("https://assets.smallcase.com/images/smallcases/200/ICIET_0002.png"))),
    smallcaseAuthToken: Optional("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFsbGNhc2VBdXRoSWQiOiI2MDViNTM3YzY2YzU0NzM5NTc1MWFiYTgiLCJpYXQiOjE2MjA3MzI1NDMsImV4cCI6MTYyMDczNjE0M30.mvUsgeN6rUS55P3wFF0oWM5dClokabJPDAjMrSaZJxY"),
    signup: nil,
transactionId: Optional("TRX_cd6a0fe15c4f4382b9373643f0b14cb9")))

2.7.1 (2021-03-16)

Features

  • Added archive smallcase order

    If an SMT transaction is partially filled or unfilled, the user is given an option to either -

    • Repair : retry unfilled stock orders
    • Archive: accept smallcase as is

    Repair is done by creating a transactionId
    We have now exposed the markSmallcaseArchived method to facilitate archive functionality.

    Intents Impacted: TRANSACTION

    Syntax:

func markSmallcaseArchive(iscid: String, completion: @escaping(Data?, Error?) -> Void)

Bug Fixes

  • Sip Setup response refactor
    Earlier the response for intent SIP_SETUP consisted of a key sipAction with a single string value (eg: “create”).
sipSetup(smallcaseAuthToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFsbGNhc2VBdXRoSWQiOiI2MDViNTM3YzY2YzU0NzM5NTc1MWFiYTgiLCJpYXQiOjE2MjA5NzUyODgsImV4cCI6MTYyMDk3ODg4OH0.7xhn6YYQD9ijchGMgyZTDwJqvKkvCfybTuqP2VVT8W8",
         sipAction: "",
         transactionId: "TRX_0c617aae6b734167ab94eb46d1533982")

This has been refactored to contain more information related to a sip action made by the user like the sip amount, frequency etc.

sipSetup(smallcaseAuthToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFsbGNhc2VBdXRoSWQiOiI2MDViNTM3YzY2YzU0NzM5NTc1MWFiYTgiLCJpYXQiOjE2MjA3MzEyMzUsImV4cCI6MTYyMDczNDgzNX0.IqLRdMUsyBoZEq07fZZ3WqqI2r8hrR-P9oHEDAg2rko",
         sipAction: SCGateway.SipDetail(
           sipActive: Optional(true),
           sipAction: Optional("create"), 
           amount: Optional(200.93),
           frequency: Optional("1m"),
           iscid: Optional("60950c8bf5ebfbd545f6a958"), 
           scheduledDate: Optional("2021-05-11T00:00:00.000Z"),
           scid: Optional("ICIET_0003"), 
           sipType: Optional("manual")),
         transactionId: "TRX_5e9f31514ee14ad69e75f7feac368ab6")

Intents Impacted: SIP_SETUP